Files
yuriy odonnell d39ff6fb57 unsync - Basic implementation of unpack command
* Only filesystem based packs at this point

[CL 29457142 by yuriy odonnell in ue5-main branch]
2023-11-04 01:04:21 -04:00

24 lines
797 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "UnsyncBuffer.h"
#include "UnsyncUtil.h"
namespace unsync {
uint64 GetMaxCompressedSize(uint64 RawSize);
FBuffer Compress(const uint8* Data, uint64 DataSize, int ZstdCompressionLevel = 3);
// Compress input into pre-allocated buffer that's at least as large as indicated by GetMaxCompressedSize()
// Returns compressed data actual size.
uint64 CompressInto(FBufferView Input, FMutBufferView Output, int ZstdCompressionLevel = 3);
FBuffer Decompress(const uint8* Data, uint64 DataSize);
FBuffer Decompress(const FBuffer& Buffer);
bool Decompress(const uint8* InputData, uint64 InputDataSize, uint8* OutputData, uint64 OutputDataSize);
bool Decompress(FBufferView Input, FMutBufferView Output);
} // namespace unsync