nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
arithcoding.hpp
Go to the documentation of this file.
1
3// toolboxes/comm/include/nk/comm/source/arithcoding.hpp
4//
5// Arithmetic coding encoder + decoder.
6
7#pragma once
8
9#include <cstddef>
10#include <memory_resource>
11#include <nk/value/value.hpp>
12
13namespace nk::comm {
14
17
18
32Value arithenco(const Value &seq, const Value &counts,
33 std::pmr::memory_resource *mr = nullptr);
34
47Value arithdeco(const Value &code, const Value &counts, std::size_t len,
48 std::pmr::memory_resource *mr = nullptr);
49
50
52} // namespace nk::comm
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value arithdeco(const Value &code, const Value &counts, std::size_t len, std::pmr::memory_resource *mr=nullptr)
Invert arithenco (seq = arithdeco(code, counts, len)).
Value arithenco(const Value &seq, const Value &counts, std::pmr::memory_resource *mr=nullptr)
Arithmetic-encode a symbol sequence (code = arithenco(seq, counts)).