Skip to content

Releases: lsleonard/tiny-data-compression

v1.1.6: Random data check added

27 Dec 20:32
Compare
Choose a tag to compare
  1. Modified random data check and added a later check for random data.
  2. Added an early call to single value mode.
  3. Updated unused extended string mode to calculate high bit clear during processing and check for overflow as late as possible.

v1.1.5: Add adaptive text mode

08 Dec 23:34
Compare
Choose a tag to compare
  1. Added adaptive text mode that looks for occurrences of characters
    that are common to a particular data type when fewer than 3/4 of
    the input values are matched by a predefined character. Defined
    XML and HTML based on '<', '>', '/' and '"'. Defined C or other
    code files based on '*', '=', ';' and '\t'. Eight characters
    common to the text type are defined in the last 8 characters of
    the characters encoded.
  2. Added compression of high bit in unique characters in string mode
    when the high bit is 0 for all values.
  3. Set the initial loop in td64 to 7/16 of input values for 24 or
    more inputs. This provides a better result for adaptive text mode.

v1.1.4: Add bit text mode

29 Nov 02:44
Compare
Choose a tag to compare
  1. Added bit text mode that uses variable length encoding bits
    to maximize compression. td5 still uses the fixed bit text mode.
  2. Changed the random data metric to use number values init
    loop * 7/8 + 1 to be threshold for random data.
  3. Implemented a static global for decoding bit text mode and
    string mode to limit reads of input values.

v1.1.3: Fix bugs in td5 and td5d

22 Nov 18:54
Compare
Choose a tag to compare
  1. Fixed bugs in td5 and td5d functions.
  2. Recognize random data starting at 16 input values.

v1.1.2: Updates related to using 7-bit mode

21 Nov 17:07
Compare
Choose a tag to compare
  1. Moved 7-bit mode defines to td64.h because they are used
    outside of the 7-bit mode.
  2. When fewer than minimum values to use 7-bit mode of 16, don't
    accumulate high bit when reasonable. Main loop keeps this in because
    time required is minimal.
  3. When fewer than 24 input values, but greater than or equal to minimum
    values of 16 to use 7-bit mode, use 6% as minimum compression for
    compression modes used prior to 7-bit mode.

v1.1.1

20 Nov 17:32
Compare
Choose a tag to compare

Initial release of tiny data compression as td512: High-speed lossless tiny data compression of 1 to 512 bytes.

Main program reads a file into memory that is compressed by calling td512 repeatedly. When complete, the compressed data is written to a file and read for decompression by calling td512d. td512 is based on the td64 interface, also included in this release, that compresses 1 to 64 bytes.

td512 filename [loopCount]]

filename is required argument 1.
loopCount is optional argument 2 (default: 1). Looping is performed over the entire input file.

The release includes the interface td64 that integrates several compression modes to compress 1 to 64 bytes: fixed bit, text mode, single value, string mode, and 7-bit encoding and decoding. td64 returns the number of compressed bytes or 0 if compression failed or a negative value if an error occurred. Values are returned only if compression succeeds. Decoding of the td64 values requires the caller to supply the number of original bytes.