using System;
using System.Collections.Generic;
using System.Text;
namespace DSDecmp
{
public class TooMuchInputException : Exception
{
///
/// Gets the number of bytes read by the decompressed to decompress the stream.
///
public long ReadBytes { get; private set; }
///
/// Creates a new exception indicating that the input has more data than necessary for
/// decompressing th stream. It may indicate that other data is present after the compressed
/// stream.
///
/// The number of bytes read by the decompressor.
/// The indicated length of the input stream.
public TooMuchInputException(long readBytes, long totLength)
: base("The input contains more data than necessary. Only used 0x"
+ readBytes.ToString("X") + " of 0x" + totLength.ToString("X") + " bytes")
{
this.ReadBytes = readBytes;
}
}
}