This release improves small-input encoding and makes entropy-table ownership
explicit. The wire layout and existing public entry points remain compatible.
It is a userspace codec release, not a Linux kernel port or a claim of
universal superiority over LZ4/Zstd.
- Fast one-shot inputs up to 4 KiB initialize only reachable full-width hash
buckets and allocate a circular chain sized to the input. A 4 KiB input
avoids 240 KiB of chain allocation at the default window; the 1 MiB primary
map allocation remains. Streaming and larger-input setup are unchanged.
Seven paired in-process runs measured about 2.7x faster encoding for 1 KiB
text and +10.7% throughput for 4 KiB text, with identical compressed bytes.
These allocation-sensitive measurements are separate from CLI/page-API
comparisons; large-input controls were approximately unchanged. - Fix explicit
format_v2with fast mode. Plain compressed blocks always
decode matches with a four-byte minimum, but this combination previously
emitted a three-byte bias and could produce undecodable data. Fast mode
now uses ordinary v1 tokens; balanced/extreme retain the requested v2
entropy format. Creation, chunk compression and reset apply the same
rule, including mode changes while the requested format remains enabled. - Add checked caller-owned workspace entry points for single/four-stream
Huffman and ANS literal decoding, with size/alignment queries. Existing
allocating wrappers remain available. SEQ/S/T decoding reuses its existing
48 KiB sequence-table region during the earlier literal phase, removing
one nested allocation and up to 17,412 bytes of peak table storage. Whole
frame decoding still allocates, and legacy context tables are unchanged.
Single/four-stream ANS literal decoding also uses the existing direct-table
builder, removing its separate 4 KiB spread array from the stack. This
reduces those individual frames, not the whole codec's worst-case stack. - Add
VV_DISABLE_SIMD=1and a cleanmake SIMD=0build mode. Scalar copy
calls bypass runtime dispatch and its mutable state.make scalar-test
separately builds the integer core with general-purpose registers only
and runs eleven userspace regression suites. The normal x86-64 decoder
still uses inline AVX2; it is not a runtime-portable binary for older CPUs. - Add a caller-owned FAST context for independent inputs up to 64 KiB. It
separates size/alignment/init from compression, performs no hot-path heap
allocation, resets history on every call and preserves one-shot output
bytes. Compact 16-bit matcher positions reduce queried workspace to 537,800
bytes for a 4 KiB limit and 722,361 bytes for 64 KiB. Roots clear sparsely
below 4 KiB and densely at and above 4 KiB. Even after this reduction the
context is too large for a credible per-CPU zram proposal without more work. - Check frame-footer capacity before writing, accept a null zero-length XXH64
input without pointer arithmetic, and validate checksum tails and decoder
spans by remaining length before advancing input pointers. Both AVX2
prefetch phases validate literal capacity and match history before forming a
lookahead pointer. New regressions exercise exact/truncated endpoints,
oversized frame/block lengths, multiframe boundaries, streaming-capacity
retry and both prefetch phases. These are invariant hardening changes, not a
claim that an observed crash was repaired; valid encoded bytes are unchanged. - Add workspace ownership/capacity/reuse regressions. On Linux, the normal
test target injects allocation failures to require zero allocations in
workspace literal calls and exactly one allocation in tested S/T decode
paths. Exact-buffer, sanitizer and MemorySanitizer checks cover the new
small-input initialization and format-selection paths. - Add a reproducible page-sized in-process comparison harness with explicit
one-shot API, framing, checksum and allocation caveats. Refresh English
and Portuguese documentation while retaining historical evidence under
its original version. Document the remaining licensing, stack, allocator,
architecture and human-review requirements for a possible kernel port.
No Linux patch is submitted and no new formal proof is claimed. - Final scalar page-profile measurements cover 216 profiles across 4/16/64 KiB
and preserve 2,304 frames byte-for-byte. On 4 KiB synthetic text, LZ4 remains
substantially faster and Zstd level 1 remains smaller and faster to encode;
VaptVupt has the faster decode of the two measured Zstd settings but retains
much more context memory. Six paired builds found strong 4 KiB context-encode
gains on random, records and repeating inputs, alongside a 2.36% 64 KiB
records decode-batch loss and a 12.24% 4 KiB text decode-p95 loss. The release
does not claim to supersede LZ4 or Zstd.
Source archive SHA-256: dbe268feaf120f295066fed85f9ef2c14f157bb96773aa5a46ece6c0198b7563