public static int ReadCompressedSize(Stream inputStream) { DcxFile result = new DcxFile(); BigEndianBinaryReader reader = new BigEndianBinaryReader(inputStream, Encoding.UTF8, true); result.ReadCommonHeader(reader); return(result.CompressedSize); }
public static DcxFile Read(Stream inputStream) { DcxFile result = new DcxFile(); BigEndianBinaryReader reader = new BigEndianBinaryReader(inputStream, Encoding.UTF8, true); result.ReadCommonHeader(reader); result.ReadCompressionHeader(reader); result.CompressedData = reader.ReadBytes(result.CompressedSize); return(result); }