CSPspEmu.Hle.Formats.Dax.ReadBlockDecompressed C# (CSharp) Method

ReadBlockDecompressed() public method

public ReadBlockDecompressed ( uint Block ) : byte[]
Block uint
return byte[]
        public byte[] ReadBlockDecompressed(uint Block)
        {
            if (Block >= NumberOfBlocks)
            {
                return new byte[0];
            }
            var In = ReadBlockCompressed(Block);

            // If block is not compressed, get the contents.
            if (!Blocks[Block].IsCompressed)
            {
                return In;
            }

            return new DeflateStream(new MemoryStream((byte[])In.Concat(new byte[] { 0x00 })), CompressionMode.Decompress).ReadAll();
        }