Esempio n. 1
0
        public static ChunkedLz4FileTable Read(Stream input, int chunkCount)
        {
            using (var reader = new BinaryReader(input, Encoding.ASCII, true))
            {
                Lz4Chunk[] chunks = new Lz4Chunk[chunkCount];
                for (int i = 0; i < chunkCount; i++)
                {
                    chunks[i] = new Lz4Chunk
                    {
                        CompressedChunkSize   = reader.ReadInt32(),
                        DecompressedChunkSize = reader.ReadInt32(),
                        EndOfChunkOffset      = reader.ReadInt32()
                    };
                }

                return(new ChunkedLz4FileTable
                {
                    Chunks = chunks,
                });
            }
        }
        public static ChunkedLz4FileTable Read(Stream input, int chunkCount)
        {
            using (var reader = new BinaryReader(input, Encoding.ASCII, true))
            {
                Lz4Chunk[] chunks = new Lz4Chunk[chunkCount];
                for (int i = 0; i < chunkCount; i++)
                {
                    chunks[i] = new Lz4Chunk
                    {
                        CompressedChunkSize = reader.ReadInt32(),
                        DecompressedChunkSize = reader.ReadInt32(),
                        EndOfChunkOffset = reader.ReadInt32()
                    };
                }

                return new ChunkedLz4FileTable
                {
                    Chunks = chunks,
                };
            }
        }