Skip to content
Masa-tamPublic

About

C++20 framework for streaming lossless compression (Huffman, Range/ANS, LZ77–LZMW), built via specification-driven independent implementation.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

marc

marc logo

CI

marc is a C++20 framework for independently designed, streaming lossless compression components. Its public surface includes five standalone entropy codecs, all six required standalone dictionary codecs, every one of the thirty dictionary/entropy pairings, and a version 1.1 checksum-raw framing profile with mandatory per-frame CRC-32C. All forty-two profiles are exposed through a small C ABI and the command-line tool. The format and API are still under development and version 0.x streams are not yet promised long-term compatibility.

The documentation index separates library and format guides from validation material and chronological implementation records. The composition matrix records the current published pairings and the staged development history behind their admission. User-visible release contents are recorded in the changelog; maintainer release gates are defined in the release process.

Build

Initialize the compiler environment, then use the repository presets:

cmake --preset windows-msvc
cmake --build --preset windows-msvc-debug
ctest --preset windows-msvc-debug

Windows uses the Visual Studio generator and MSBuild. The portable presets use Ninja on non-Windows hosts. GoogleTest is needed only when MARC_BUILD_TESTS is enabled; initialize the pinned submodule with:

git submodule update --init --recursive

The canonical Windows preset enables MSVC /MP within each C/C++ target. Set MARC_MSVC_MULTIPROCESS_COMPILE=OFF when a constrained machine requires serial translation-unit compilation.

GoogleTest enumeration has its own timeout, separate from each CTest case. MARC_GTEST_DISCOVERY_TIMEOUT defaults to 60 seconds so cold Windows runners can list the complete test inventory; maintainers may override it with a positive integer at configure time.

CI enables project-level parallel builds and runs the complete main test suites with two CTest slots. Long boundary and compatibility tests receive relative COST hints so they start early. Named 16-, 32- and 64-MiB test groups and the compatibility suite share the marc_large_window resource lock; smaller tests can use the other slot. The compatibility suite invokes large-window codecs. Scheduling properties also apply after GoogleTest's PRE_TEST discovery. These hints change no test coverage, watchdog, codec limit or stream bytes, and the lock is not a process-memory ceiling. The local presets keep their existing concurrency defaults; use --parallel 2 to select parallel testing.

Command-line tool

Top-level builds produce a small marc executable that exercises the public C ABI with bounded streaming buffers. LZ77 variant 1 is the default profile:

marc encode input.bin output.marc
marc decode output.marc restored.bin
marc encode --codec blocked-huffman input.bin output.marc
marc decode --codec blocked-huffman output.marc restored.bin

See the command-line reference for all profiles and file/error behavior.

CMake consumption

An installed package exports whichever libraries were enabled when marc was built:

find_package(marc CONFIG REQUIRED)
target_link_libraries(my_program PRIVATE marc::shared) # or marc::static

Benchmarks

Set MARC_BUILD_BENCHMARKS=ON in an optimized build to produce marc_benchmark. It reports canonical compression ratio, encode/decode MiB/s, and peak caller-owned codec workspace for all forty-two benchmark-admitted profiles. See docs/benchmarks.md for the measurement contract.

Fuzzing

Set MARC_BUILD_FUZZERS=ON in a separate Clang/LLVM sanitizer build to produce bounded stream-decoder fuzz targets for all currently public profiles. Build and corpus instructions are in docs/fuzzing.md.

Interoperability

Successful Windows and Ubuntu CI jobs publish deterministic archive bundles for external platform checks. See docs/interoperability.md for download, verification, and result-reporting instructions. The current local-versus-release status of every baseline codec is summarized in docs/baseline-readiness.md.

The standalone project in examples/ demonstrates installed-package use. See docs/c-api.md for the C transform lifecycle and docs/format.md for the current byte representation.

License and provenance

Contribution requirements, including the specification-driven independent implementation process, are documented in CONTRIBUTING.md.

The repository is MIT licensed. Its implementation process is described as a specification-driven independent implementation; provenance and intentionally unconsulted implementation sources are recorded in docs/implementation/clean-room-record.md. This process is not a legal guarantee of non-infringement.

About

C++20 framework for streaming lossless compression (Huffman, Range/ANS, LZ77–LZMW), built via specification-driven independent implementation.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages