コード例 #1
0
ファイル: FtexsFileChunk.cs プロジェクト: shdwdln/FtexTool
        public void SetData(byte[] chunkData, bool compressed, bool chunked)
        {
            if (compressed)
            {
                ChunkData = ZipUtility.Inflate(chunkData);

                if (chunked)
                {
                    _index.ChunkSize           = Convert.ToInt16(ChunkData.Length);
                    _index.CompressedChunkSize = Convert.ToInt16(chunkData.Length);
                }
            }
            else
            {
                ChunkData = chunkData;

                if (chunked)
                {
                    _index.ChunkSize           = Convert.ToInt16(chunkData.Length);
                    _index.CompressedChunkSize = Convert.ToInt16(ZipUtility.Deflate(chunkData).Length);
                }
            }
        }