Release: 2.1.0 Added:VaptVupt 1.4.0: cross-block dictionary carry, context decode prefetch, faster adaptive window trial (2.6× encode), integration API
This commit is contained in:
parent
287ca9d3c2
commit
537e071e0d
23 changed files with 223 additions and 101 deletions
49
include/vaptvupt_api.h
Normal file
49
include/vaptvupt_api.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/* VaptVupt codec — originally Apache-2.0 by Cristian Cezar Moisés
|
||||
* Integrated into Zupt — MIT License
|
||||
* Copyright (c) 2026 Cristian Cezar Moisés
|
||||
* SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 */
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2026 Cristian Cezar Moisés
|
||||
* SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* VaptVupt — tANS Entropy Codec (v2: sparse header + 4-way interleaved)
|
||||
*
|
||||
|
|
@ -108,7 +109,8 @@ vva_error_t vva_encode_sequences(const uint8_t *tokens, size_t tok_len,
|
|||
int off_bytes);
|
||||
|
||||
vva_error_t vva_decode_sequences(const uint8_t *src, size_t src_len,
|
||||
uint8_t *dst, size_t dst_cap, size_t *dst_len);
|
||||
uint8_t *dst, size_t dst_cap, size_t *dst_len,
|
||||
const uint8_t *dst_base);
|
||||
|
||||
static inline size_t vva_bound(size_t src_len) {
|
||||
/* Context model header can be up to ~10KB, seq coding adds 3 table headers */
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2026 Cristian Cezar Moisés
|
||||
* SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* VaptVupt — Canonical Huffman Codec
|
||||
*
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#define zupt_mkdir(p) mkdir(p, 0755)
|
||||
#endif
|
||||
|
||||
#define ZUPT_VERSION_STRING "2.0.0"
|
||||
#define ZUPT_VERSION_STRING "2.1.0"
|
||||
#define ZUPT_FORMAT_MAJOR 1
|
||||
#define ZUPT_FORMAT_MINOR 4
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue