private bool SerializeOodleDecompressData(FOodleCompressedData dataInfo, out byte[] outData) { outData = new byte[0]; var decompressedLength = (int)dataInfo.DecompressedLength; var compressedLength = (int)dataInfo.CompressedLength; if (compressedLength > _innerArchive.Length - dataInfo.Offset || decompressedLength > MAX_COMPRESS_BUFFER || compressedLength > MAX_COMPRESS_BUFFER) { return(false); } _innerArchive.Position = dataInfo.Offset; if (compressedLength == decompressedLength) { outData = _innerArchive.ReadBytes(decompressedLength); } else { outData = new byte[decompressedLength]; var compressedData = _innerArchive.ReadBytes(compressedLength); Compression.Oodle.Decompress(compressedData, 0, compressedLength, outData, 0, decompressedLength); } return(outData.Length == decompressedLength); }
public FDictionaryHeader(FArchive Ar) { Magic = Ar.Read <uint>(); DictionaryVersion = Ar.Read <uint>(); OodleMajorHeaderVersion = Ar.Read <uint>(); HashTableSize = Ar.Read <int>(); DictionaryData = Ar.Read <FOodleCompressedData>(); CompressorData = Ar.Read <FOodleCompressedData>(); }