codec: update vendored VaptVupt codec 2.65.0 -> 2.65.3

From vaptvupt-codec tag v2.65.3. Output is byte-identical to 2.65.0 (same
ratio, wire format v1.6 unchanged) but extreme-mode encode is ~1.6-2x faster
(Sprint 132 optimal-parser speedup) and the extreme prepass window allocation
is capped at wlog=20 = 8 MiB virtual instead of up to 128 MiB (Sprint 133
memory hygiene). Our AVX2 offset-read decoder guard is now UPSTREAM (dropped
from the local patch set); the ANS safe-zone 2*SAFEZONE_MAX_RUN reserve is
re-applied on top (still not upstream). make check 16/16, KAT 16/16, cross-
version roundtrip with 5.1.0 archives verified.
This commit is contained in:
Cristian Cezar Moisés 2026-07-12 14:47:40 -03:00
commit 59f9ebc59e
24 changed files with 94 additions and 17 deletions

43
vendor/vuptsdk/include/vaptvupt_api.h vendored Normal file
View file

@ -0,0 +1,43 @@
/*
* VaptVupt Zupt Integration API
* SPDX-License-Identifier: GPL-3.0-or-later
* Copyright 2026 Cristian.
*
* ZUPT-COMPAT: This is the API that Zupt calls. It wraps the internal
* VaptVupt API with sensible defaults for backup workloads:
* - Checksum always enabled (data integrity is critical for backups)
* - Adaptive window selection (auto-detect optimal wlog per file)
* - Level maps to mode: 1=fast, 5=balanced, 9=extreme
*
* Usage:
* size_t bound = vvz_compress_bound(src_len);
* uint8_t *dst = malloc(bound);
* int64_t csz = vvz_compress(src, src_len, dst, bound, 5);
* int64_t dsz = vvz_decompress(dst, csz, out, out_cap);
*/
#ifndef VAPTVUPT_API_H
#define VAPTVUPT_API_H
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Compress src into dst. Returns compressed size or negative error code.
* level: 1 = fast (max speed), 5 = balanced (default), 9 = extreme (max ratio) */
int64_t vvz_compress(const uint8_t *src, size_t src_len,
uint8_t *dst, size_t dst_cap, int level);
/* Decompress src into dst. Returns decompressed size or negative error code. */
int64_t vvz_decompress(const uint8_t *src, size_t src_len,
uint8_t *dst, size_t dst_cap);
/* Upper bound on compressed size for a given input length. */
size_t vvz_compress_bound(size_t src_len);
#ifdef __cplusplus
}
#endif
#endif /* VAPTVUPT_API_H */