ExCodecs.Native (ex_codecs v0.1.0)

Copy Markdown View Source

Native NIF module providing Rust-based compression implementations.

This module loads precompiled NIF binaries for Zstd, LZ4, Snappy, Bzip2, and Blosc2 compression/decompression via RustlerPrecompiled. If a precompiled artifact is not available for the current platform, it falls back to compiling the Rust NIF from source (requires the Rust toolchain).

If the NIF fails to load entirely, all functions fall back to :erlang.nif_error(:nif_not_loaded), and codecs are registered as unavailable at startup.

Note: This module is excluded from coverage because all functions are Rustler NIF stubs that are replaced at load time by the native implementation.