public static byte[] GetDecompressedSegment(BinaryReader br, SegmentHeader h, int sizeCompressed) { byte[] data = GetCompressedSegment(br, h, sizeCompressed); return(LZ4.Decode(data, h.DecompressedSize)); }
public static byte[] GetCompressedSegment(BinaryReader br, SegmentHeader h, int sizeCompressed) { br.BaseStream.Position = h.FileOffset; return(br.ReadBytes(sizeCompressed)); }