Slim numerical data compression
1.0
|
Go to the documentation of this file.
8 #ifndef SLIM_SINGLE_CODEC_H
9 #define SLIM_SINGLE_CODEC_H
20 unsigned int order=1) {
38 unsigned int order=1) {
41 if (n_minus_order > 0) {
42 int n_minus_1 = n_minus_order + order - 1;
44 uint32_t uval = ib->
readbits(n_minus_1);
45 return uval | bitNset[n_minus_1];
55 #endif // #ifndef SLIM_SINGLE_CODEC_H
@ BITS_SECTION_FOOT
Number of bits to write for sect. foot markers.
Definition: slim_file.cpp:41
static const struct option long_opt[]
The long options slim recognizes.
Definition: slim_control.cpp:41
const char short_opt[]
Single-character options.
Definition: slim_control.cpp:38
int main(int argc, char *argv[])
Main program.
Definition: slim_dump.cpp:61
double log2(double x)
Log-base2 of the argument.
Definition: slim_codec_reduced_binary.cpp:168
Word_t read_unary()
Read a single unary-coded value.
Definition: bitstream.cpp:622
Word_t readbits(int nbits)
Read data from the buffer as unsigned ints.
Definition: bitstream.cpp:556
Definition: bitstream.h:105
section_foot_markers_t
Markers at the end of sections to tell whether more follow.
Definition: slim_file.cpp:38
int alter_mtime(const char *filename, time_t mtime)
Alter the access and modification time on a closed file.
Definition: slim_file.cpp:68
void dump_one_file(const char *path)
Dump the info from a single file.
Definition: slim_dump.cpp:28
void writebits(uint32_t data, int nbits)
Write data to the buffer.
Definition: bitstream.cpp:237
decoder * decoder_generator(code_t code, data_t data_type, bool deltas)
Generating function for various decoders.
Definition: slim_codec_factory.cpp:105
static unsigned int bit_size(int32_t i)
Find size (on [0,32]) of the smallest # that can hold the integer i.
Definition: bitstream.h:166
void write_unary(unsigned int value)
Write a unary code for the value.
Definition: bitstream.cpp:303
Definition: bitstream.h:78
uint32_t mexp_golomb_read_u32(ibitstream *ib, unsigned int order=1)
Read an unsigned 32-bit value from a bitstream by method mexp_golomb.
Definition: slim_single_codec.h:37
encoder * encoder_generator(enum code_t code, enum data_t data_type, bool deltas)
Generating function for various encoders.
Definition: slim_codec_factory.cpp:34
@ NOT_LAST_SECTION
Marker for all non-final sections in file.
Definition: slim_file.cpp:39
static void verify_twos_complement()
Fail an assertion if this is NOT a TWOS-COMPLEMENT machine.
Definition: slim_file.cpp:50
@ LAST_SECTION
Marker for the last section in a file.
Definition: slim_file.cpp:40
#define RAW_SUFFIX
Suffix for all raw files when preserving original.
Definition: slim_control.cpp:34
void mexp_golomb_write(obitstream *ob, uint32_t u, unsigned int order=1)
Write an unsigned value to a bitstream by method mexp_golomb.
Definition: slim_single_codec.h:19