ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
Tans.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*------------------------------ File Tans.h -------------------------------*/
3/*--------------------------------------------------------------------------*/
73/*--------------------------------------------------------------------------*/
74/*----------------------------- DEFINITIONS --------------------------------*/
75/*--------------------------------------------------------------------------*/
76
77#ifndef __ADS_Tans
78 #define __ADS_Tans
79/* self-identification: #endif constant */
80
81/*--------------------------------------------------------------------------*/
82/*------------------------------ INCLUDES ----------------------------------*/
83/*--------------------------------------------------------------------------*/
84
85#include "ADS/Contract.h"
87
88#include <array>
89#include <bit>
90#include <cstddef>
91#include <cstdint>
92#include <span>
93#include <vector>
94
95/*--------------------------------------------------------------------------*/
96/*--------------------------- NAMESPACE ------------------------------------*/
97/*--------------------------------------------------------------------------*/
98
99namespace ADS
100{
101
127[[nodiscard]] inline std::vector< std::uint8_t >
128tansCompress( std::span< const std::uint8_t > in );
129
154[[nodiscard]] inline std::vector< std::uint8_t >
155tansDecompress( std::span< const std::uint8_t > in );
156
157/*--------------------------------------------------------------------------*/
158
159} // end( namespace ADS )
160
161/*--------------------------------------------------------------------------*/
162/*-------------------------- IMPLEMENTATION --------------------------------*/
163/*--------------------------------------------------------------------------*/
164
165#include "ADS/compression/impl/Tans.tpp"
166
167/*--------------------------------------------------------------------------*/
168
169#endif /* Tans.h included */
170
171/*--------------------------------------------------------------------------*/
172/*---------------------------- End File Tans.h -----------------------------*/
173/*--------------------------------------------------------------------------*/
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The range variant of the asymmetric numeral systems of Duda (rANS), the entropy coder of order 0 of t...
std::vector< std::uint8_t > tansCompress(std::span< const std::uint8_t > in)
the tANS code of order 0 of the bytes of in, with the frequencies and the size
std::vector< std::uint8_t > tansDecompress(std::span< const std::uint8_t > in)
the bytes that tansCompress() coded in in
Definition ADT.h:96