Skip to content

Commit 1208278

Browse files
authored
Convert DCCLI documentation to Markdown
1 parent ad9d5b6 commit 1208278

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
Overview
2+
---
3+
14
DCCLI is a command line application which allows compressing and decompressing (referred to as encoding and decoding henceforth) files using DCLib.
25

3-
Usage: <input file> <output file> <list of encoders/decoders with options>
4-
The list of encoders/decoders is separated by a separate #. Each encoder/decoder must specify either 'encode' or 'decode', followed by the encoder/decoder name. Options can be specified separately after that. They affect only encoder/decoder that precedes them in the command line. Options are specified as <name>=<value> or <name> for boolean options.
5-
Example: input.dat output.dat encode copy # decode copy blocksize=8
6+
Usage: `<input file> <output file> <list of encoders/decoders with options>`
7+
8+
The list of encoders/decoders is separated by a separate #. Each encoder/decoder must specify either `encode` or `decode`, followed by the encoder/decoder name. Options can be specified separately after that. They affect only encoder/decoder that precedes them in the command line. Options are specified as `<name>=<value>` or `<name>` for boolean options.
9+
10+
Example: `input.dat output.dat encode copy # decode copy blocksize=8`
11+
12+
Notes on usage
13+
---
614

7-
Notes on usage:
8-
* If a fractional number of bytes (i.e., a number of bits not divisible by eight) is written to the output file, decoding said output file later may lead to errors at the last byte when processing the superfluous bits at the end of the file
9-
* When using only one encoder/decoder, data read from the input file is processed and written directly (buffered) to the output file, requiring no additional memory. If, however, multiple encoders/decoders are used, data read from the input file is processed and written to a temporary buffer. For all but the last encoder/decoder, data is read from this temporary buffer, processed and written to another temporary buffer. For the last encoder/decoder, data from this temporary buffer is read, processed and written to the output file. Since all data is processed by one encoder/decoder after another, all intermediate data will be held in the described temporary buffers. Processing large files can therefore lead to high memory consumption
10-
* The size of the temporary buffers described above may be reduced at compile-time via TEMP_BUFFER_SIZE. However, since the buffers resize themselves automatically, TEMP_BUFFER_SIZE is only their initial size, which is no indicator of the acutal memory consumption when processing larger files with more than one encoder/decoder
11-
* The size of the input and output file buffers may be reduced at compile-time via READ_BUFFER_SIZE and WRITE_BUFFER_SIZE. Both are guaranteed to remain unchanged throughout the execution of the program
15+
* If a fractional number of bytes (i.e., a number of bits not divisible by eight) is written to the output file, decoding said output file later may lead to errors at the last byte when processing the superfluous bits at the end of the file.
16+
* When using only one encoder/decoder, data read from the input file is processed and written directly (buffered) to the output file, requiring no additional memory. If, however, multiple encoders/decoders are used, data read from the input file is processed and written to a temporary buffer. For all but the last encoder/decoder, data is read from this temporary buffer, processed and written to another temporary buffer. For the last encoder/decoder, data from this temporary buffer is read, processed and written to the output file. Since all data is processed by one encoder/decoder after another, all intermediate data will be held in the described temporary buffers. Processing large files can therefore lead to high memory consumption.
17+
* The size of the temporary buffers described above may be reduced at compile-time via `TEMP_BUFFER_SIZE`. However, since the buffers resize themselves automatically, `TEMP_BUFFER_SIZE` is only their initial size, which is no indicator of the acutal memory consumption when processing larger files with more than one encoder/decoder
18+
* The size of the input and output file buffers may be reduced at compile-time via `READ_BUFFER_SIZE` and `WRITE_BUFFER_SIZE`. Both are guaranteed to remain unchanged throughout the execution of the program.

0 commit comments

Comments
 (0)