Skip to content

Commit aa10435

Browse files
authored
Convert DCLib documentation to Markdown
1 parent aaca71f commit aa10435

2 files changed

Lines changed: 38 additions & 27 deletions

File tree

DataCompressor/DCLib/doc/overview.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

DataCompressor/DCLib/doc/readme.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Overview
2+
---
3+
4+
DCLib is a library which allows compressing and decompressing (referred to as encoding and decoding henceforth) data from buffers (see DCIOLib).
5+
6+
`enc_dec.h`: Allows listing and using all implemented encoders/decoders as well as their options. Life cycle: `GetEncoder` -> (optional option configuration, see below) -> `enc_dec_t.encoder` (for encoding) or `enc_dec_t.decoder` (for decoding) call on initialized input and output bit buffers. Optional option configuration: (optional) `OptionNameExists` -> (optional) `EncoderSupportsOption` -> `GetOptionType` -> `GetAllowedOptionValueRange` -> `SetOptionValue<Type>`.
7+
8+
Encoders/decoders
9+
---
10+
11+
* aggregate: Sums of `num_values` (option name) consecutive floating-point values (no decoder!).
12+
* bac: Performs binary arithmetic coding as implemented by Witten et al.
13+
* copy: Copies the input to the output, i.e., it performs no compression whatsoever. This encoder/decoder operates on blocks of `blocksize` (option name) bits size.
14+
* csv: Reads lines of comma-separated values and converts the strings in column number `column` (option name) of each line to a list of (binary) floating-point values when encoding; performs the reverse conversion when decoding and inserts blank columns if necessary.
15+
* diff: Encodes (signed) differences between consecutive (unsigned) values of `valuesize` (option name) bits size when encoding; reconstructs (unsigned) values of `valuesize` (option name) bits size from their consecutive (signed) differences when decoding
16+
* lzmh: Performs LZMH coding and decoding from Ringwelski et al. This is an integrated third-party implementation.
17+
* normalize: Converts floating-point values to (signed) integer values of `valuesize` (option name) bits size when encoding; performs the reverse conversion when decoding. To preserve decimal places after the decimal point, all values are multiplied by `normalization_factor` (option name) when encoding, and divided when decoding.
18+
* seg: Creates Exponential Golomb code words from values when encoding; reconstructs Exponential Golomb code words when decoding. All values are `valuesize` (option name) bits in size and signed.
19+
20+
Supported encoder input and output formats
21+
---
22+
23+
Note: Decoder input and formats are reversed, if there is a decoder).
24+
25+
* aggregate: binary float in, binary float out
26+
* bac: arbitrary in, binary out
27+
* copy: arbitrary in, arbitrary out
28+
* csv: ASCII float in, binary float out
29+
* diff: unsigned int in, signed int out
30+
* lzmh: ASCII float in, binary out
31+
* normalize: float in, signed int out
32+
* seg: signed int in, binary out
33+
34+
Notes on usage
35+
---
36+
37+
* GetEncoderNames requires a `char*` array with `GetNumberOfEncoders` fields.
38+
* When adding or renaming encoders/decoders or options, make sure the arrays remain sorted by name. Otherwise, the find operations will not work as expected.

0 commit comments

Comments
 (0)