diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:46:26 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-03-27 01:46:26 +0000 |
commit | dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa (patch) | |
tree | b147568ccffc4cdba9e2a98de1452450ba8e55c3 /lib/util/runlength.h | |
parent | 4ce684c4978610d1ea42be1b00f7332f3f5f337a (diff) | |
download | netpbm-mirror-dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa.tar.gz netpbm-mirror-dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa.tar.xz netpbm-mirror-dff6b9fdfeb78fe21a66aa459ddc1d5f7e362dfa.zip |
Promote Advanced (10.73) to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2692 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util/runlength.h')
-rw-r--r-- | lib/util/runlength.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/util/runlength.h b/lib/util/runlength.h new file mode 100644 index 00000000..4857ae61 --- /dev/null +++ b/lib/util/runlength.h @@ -0,0 +1,51 @@ +#ifndef RUNLENGTH_INCLUDED +#define RUNLENGTH_INCLUDED + +#include "pm_config.h" + +#include <limits.h> + +#ifdef __cplusplus +extern "C" { +#endif +#if 0 +} /* to fake out automatic code indenters */ +#endif + + +enum pm_RleMode { PM_RLE_PACKBITS, /* most common mode */ + PM_RLE_GRAPHON, /* reserved */ + PM_RLE_PPA, /* reserved */ + PM_RLE_SGI8, /* reserved */ + PM_RLE_SGI16, + PM_RLE_PALM16 + }; + +size_t +pm_rlenc_maxbytes (size_t const inSize, + enum pm_RleMode const mode); + +void +pm_rlenc_allocoutbuf(unsigned char ** const outbufP, + size_t const inSize, + enum pm_RleMode const mode); + + +void +pm_rlenc_freebuf(void * const buf); + +void +pm_rlenc_compressbyte(const unsigned char * const inbuf, + unsigned char * const outbuf, + enum pm_RleMode const mode, + size_t const inSize, + size_t * const outputSizeP); + +void +pm_rlenc_compressword(const uint16_t * const inbuf, + unsigned char * const outbuf, + enum pm_RleMode const mode, + size_t const itemCnt, + size_t * const outputSizeP); + +#endif |