Files
UnrealEngineUWP/Engine/Source/Programs/Unsync/Private/UnsyncCompression.h
yuriy odonnell e82582b637 unsync - Groundwork for pack command
* This can be used to generate a compressed pack of a directory
* Supports using p4 have output to limit what is included in the pack

[CL 29223576 by yuriy odonnell in ue5-main branch]
2023-10-29 11:26:35 -04:00

23 lines
738 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);
} // namespace unsync