Login | ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/ipe_artfile_utils/trunk/ipe32_lzw_encoder.h
Revision: 2
Committed: Thu Nov 8 11:19:36 2018 UTC (16 months, 2 weeks ago) by daniel-marschall
Content type: text/x-chdr
File size: 1550 byte(s)
Log Message:
Initial release to SVN

File Contents

# Content
1 /**
2 * LZW Encoder for Imagination Pilots Entertainment 32-bit games (IPE32)
3 * - Where's Waldo? Exploring Geography
4 * - Eraser Turnabout by Imagination Pilots
5 * - Virtual K'Nex by Imagination Pilots
6 * ART file packer and unpacker by Daniel Marschall, ViaThinkSoft (C) 2018
7 * Revision: 2018-02-15
8 **/
9
10 #ifndef __inc__ipe32_lzw_encoder
11 #define __inc__ipe32_lzw_encoder
12
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <stdint.h>
16 #include <stdbool.h>
17
18 typedef struct tagIpe32LZWEncoder {
19 int *code_value; /* This is the code value array */
20 unsigned int *prefix_code; /* This array holds the prefix codes */
21 unsigned char *append_character; /* This array holds the appended chars */
22
23 int num_bits; /* Starting with 9 bit codes */
24 uint32_t bytes_in,bytes_out; /* Used to monitor compression ratio */
25 int max_code; /* old MAX_CODE */
26 uint32_t checkpoint; /* For compression ratio monitoring */
27
28 int output_bit_count;
29 uint32_t output_bit_buffer;
30 } Ipe32LZWEncoder;
31
32 // Returns: Bytes written, or -1 if compression failed
33 int ipe32lzw_encode(Ipe32LZWEncoder *encoder, unsigned char* compressedData, const size_t compressedBufLen, unsigned char* uncompressedData, const size_t uncompressedSize);
34
35 Ipe32LZWEncoder* new_ipe32lzw_encoder(void);
36 void ipe32lzw_init_encoder(Ipe32LZWEncoder *encoder);
37 void ipe32lzw_free_encoder(Ipe32LZWEncoder *encoder);
38
39 #endif // #ifndef __inc__ipe32_lzw_encoder

Properties

Name Value
svn:mime-type text/x-chdr