Skip to content

v2.1.3

Choose a tag to compare

@cristiancmoises cristiancmoises released this 11 Apr 19:06
· 132 commits to master since this release

zupt v2.1.3 ☕ Caffeine Master! - 2026-04-11

Highlights

  • Shared write_enc_header() eliminates format mismatches across all encryption paths.
  • Solid compression now fully supports PQ encryption.
  • Disk restore rewritten with block device O_SYNC I/O.
  • LZHP disk backups now correctly apply prediction encoding to prevent silent data corruption.

Fixed

1. LZHP Prediction Encoding in Disk Backup

  • Fixed zupt_disk_backup() skipping the zupt_predict_encode() step for byte-prediction (pred_active=1).
  • Ensures correct prediction encoding before compression to prevent corruption on restore.
  • Allocates temporary buffer for prediction-encoded data and frees it after compression.

2. Spurious SOLID Flag on Disk Archives

  • Disk backup archives no longer incorrectly set ZUPT_FLAG_SOLID.
  • Each block archive is independent, avoiding extraction issues.

3. Shared Encryption Header

  • write_enc_header() extracted as shared function used by:
    • `zupt_compress_fiprediction encoding to prevent silent data corruption.

Fixed

1. LZHP Prediction Encoding in Disk Backup

  • Fixed zupt_disk_backup() skipping the zupt_predict_encode() step for byte-prediction (pred_active=1).
  • Ensures correct prediction encoding before compression to prevent corruption on restore.
  • Allocates temporary buffer for prediction-encoded data and frees it after compression.

2. Spurious SOLID Flag on Disk Archives

  • Disk backup archives no longer incorrectly set ZUPT_FLAG_SOLID.
  • Each block archive is independent, avoiding extraction issues.

3. Shared Encryption Header

  • write_enc_header() extracted as shared function used by:
    • zupt_compress_files()
    • zupt_compress_solid()
    • zupt_disk_backup()
  • Eliminates mismatches between different encryption paths.

4. Block Device Restore I/O

  • Uses POSIX raw I/O (open() + write() loop) with O_SYNC, fsync() + sync() for reliable block writes.

5. Build Fixes for Termux/Android

  • Improved architecture detection using $(CC) -dumpmachine with fallback to uname -m.

6. Public API Adjustments

  • zupt_w8(), zupt_w16le(), zupt_w64le() now non-static for shared usage.

Tests

  • 78 total: 70 core, 8 disk (including LZHP+PQ+password on ext4).
  • ASAN + UBSan run clean, confirming data integrity and memory safety.les()`
    • zupt_compress_solid()
    • zupt_disk_backup()
  • Eliminates mismatches between different encryption paths.