public IFileDataWrapper GetData(int offset, int size) { MemoryFileDataWrapper newData = FromArray(new byte[size]); Array.Copy(_bytes, offset, newData._bytes, 0, size); return(newData); }
public IFileDataWrapper GetCompressedData(int offset, int size, int uncompressedSize) { MemoryFileDataWrapper newData = FromArray(new byte[uncompressedSize]); using (MemoryStream ms = new MemoryStream(_bytes, offset, size)) using (ZlibStream zlib = new ZlibStream(ms, CompressionMode.Decompress)) zlib.Read(newData._bytes, 0, uncompressedSize); return(newData); }
public IFileDataWrapper GetCompressedData(int offset, int size, int uncompressedSize) { byte[] data = GetBytes(offset, size); return(MemoryFileDataWrapper.FromArray(ZlibStream.UncompressBuffer(data))); }
public IFileDataWrapper GetData(int offset, int size) { byte[] data = GetBytes(offset, size); return(MemoryFileDataWrapper.FromArray(data)); }