]> wimlib.net Git - wimlib/blobdiff - include/wimlib/compress_common.h
Get rid of input_idx_t
[wimlib] / include / wimlib / compress_common.h
index 666f10dcc43a031b5a9af818c1a00edbac35364b..9910d412c8574605ba3528f3a9b98d0d51558453 100644 (file)
@@ -2,6 +2,9 @@
  * compress_common.h
  *
  * Header for compression code shared by multiple compression formats.
+ *
+ * The author dedicates this file to the public domain.
+ * You can do whatever you want with this file.
  */
 
 #ifndef _WIMLIB_COMPRESS_COMMON_H
@@ -9,12 +12,6 @@
 
 #include "wimlib/types.h"
 
-/* Variable type that can represent all possible window positions.  */
-#ifndef INPUT_IDX_T_DEFINED
-#define INPUT_IDX_T_DEFINED
-typedef u32 input_idx_t;
-#endif
-
 /* Structure to keep track of the current state sending bits and bytes to the
  * compressed output buffer.  */
 struct output_bitstream {
@@ -44,7 +41,7 @@ struct output_bitstream {
        u8 *output;
 
        /* Number of bytes remaining in the @output buffer.  */
-       input_idx_t bytes_remaining;
+       u32 bytes_remaining;
 
        /* Set to true if the buffer has been exhausted.  */
        bool overrun;
@@ -54,7 +51,7 @@ extern void
 init_output_bitstream(struct output_bitstream *ostream,
                      void *data, unsigned num_bytes);
 
-extern input_idx_t
+extern u32
 flush_output_bitstream(struct output_bitstream *ostream);
 
 extern void
@@ -67,8 +64,8 @@ bitstream_put_byte(struct output_bitstream *ostream, u8 n);
 extern void
 make_canonical_huffman_code(unsigned num_syms,
                            unsigned max_codeword_len,
-                           const input_idx_t freq_tab[restrict],
+                           const u32 freq_tab[restrict],
                            u8 lens[restrict],
-                           u16 codewords[restrict]);
+                           u32 codewords[restrict]);
 
-#endif /* _WIMLIB_COMPRESS_H */
+#endif /* _WIMLIB_COMPRESS_COMMON_H */