diff options
author | qrort <qrort@yandex-team.com> | 2022-11-30 23:47:12 +0300 |
---|---|---|
committer | qrort <qrort@yandex-team.com> | 2022-11-30 23:47:12 +0300 |
commit | 22f8ae0e3f5d68b92aecccdf96c1d841a0334311 (patch) | |
tree | bffa27765faf54126ad44bcafa89fadecb7a73d7 /library/cpp/xdelta3/xdelta_codec/codec.h | |
parent | 332b99e2173f0425444abb759eebcb2fafaa9209 (diff) | |
download | ydb-22f8ae0e3f5d68b92aecccdf96c1d841a0334311.tar.gz |
validate canons without yatest_common
Diffstat (limited to 'library/cpp/xdelta3/xdelta_codec/codec.h')
-rw-r--r-- | library/cpp/xdelta3/xdelta_codec/codec.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/library/cpp/xdelta3/xdelta_codec/codec.h b/library/cpp/xdelta3/xdelta_codec/codec.h new file mode 100644 index 0000000000..51b935c916 --- /dev/null +++ b/library/cpp/xdelta3/xdelta_codec/codec.h @@ -0,0 +1,49 @@ +#pragma once + +#include <util/system/types.h> + +#include <string.h> + +struct _xdelta_context { + void* opaque; + void* (*allocate)(void* opaque, size_t size); + void (*free)(void* opaque, void* ptr); +}; +typedef struct _xdelta_context XDeltaContext; + +#ifdef __cplusplus +namespace NXdeltaAggregateColumn { +extern "C" { +#endif + +ui8* ApplyPatch( + XDeltaContext* context, + size_t headroomSize, + const ui8* base, + size_t baseSize, + const ui8* patch, + size_t patchSize, + size_t stateSize, + size_t* resultSize); + +ui8* ComputePatch( + XDeltaContext* context, + const ui8* from, + size_t fromSize, + const ui8* to, + size_t toSize, + size_t* patchSize); + +ui8* MergePatches( + XDeltaContext* context, + size_t headroomSize, + const ui8* patch1, + size_t patch1_size, + const ui8* patch2, + size_t patch2_size, + size_t* patch3_size); + +#ifdef __cplusplus +} +} +#endif |