mirror of
https://github.com/ratspeak/microReticulum
synced 2026-08-12 18:07:25 -04:00
Vendor libbzip2 (1.0.8, BSD license) for ESP32-compatible bz2 compression/decompression. This matches Python's bz2.compress() and Rust's bzip2 crate for cross-platform Resource transfers. C++ wrapper (Compression/BZ2.h): - bz2_compress() — compress with blockSize100k=9 - bz2_decompress() — decompress with progressive buffer sizing - try_compress() — compress only if smaller than original Resource integration: - OutboundResource::init() now compresses with bz2 if beneficial - InboundResource::assemble() decompresses if compressed flag set - ResourceFlags.compressed bit tracks compression state 3 new tests (test_resource_transfer): - testBz2CompressDecompress — roundtrip verification - testTryCompress — beneficial vs non-beneficial compression - testBz2CrossPlatformFormat — BZh magic bytes match Python/Rust Total: 137 tests, 136 pass (1 pre-existing allocator). |
||
|---|---|---|
| .. | ||
| test_main.cpp | ||