Lines Matching full:bits

44 	int bits[8];  member
88 static void init_rubin(struct rubin_state *rs, int div, int *bits) in init_rubin() argument
98 rs->bits[c] = bits[c]; in init_rubin()
151 static void init_decode(struct rubin_state *rs, int div, int *bits) in init_decode() argument
153 init_rubin(rs, div, bits); in init_decode()
168 int c, bits = 0; in __do_decode() local
171 * First, work out how many bits we need from the input stream. in __do_decode()
176 bits++; in __do_decode()
185 rs->bit_number += bits; in __do_decode()
188 * Now get the bits. We really want this to be "get n bits". in __do_decode()
196 } while (--bits); in __do_decode()
237 ret = encode(rs, rs->bit_divider-rs->bits[i], in out_byte()
238 rs->bits[i], byte & 1); in out_byte()
254 result |= decode(rs, bit_divider - rs->bits[i], in in_byte()
255 rs->bits[i]) << i; in in_byte()
262 static int rubin_do_compress(int bit_divider, int *bits, unsigned char *data_in, in rubin_do_compress() argument
272 init_rubin(&rs, bit_divider, bits); in rubin_do_compress()
308 int bits[8]; in jffs2_dynrubin_compress() local
323 memset(bits, 0, sizeof(int)*8); in jffs2_dynrubin_compress()
326 bits[7] += histo[i]; in jffs2_dynrubin_compress()
328 bits[6] += histo[i]; in jffs2_dynrubin_compress()
330 bits[5] += histo[i]; in jffs2_dynrubin_compress()
332 bits[4] += histo[i]; in jffs2_dynrubin_compress()
334 bits[3] += histo[i]; in jffs2_dynrubin_compress()
336 bits[2] += histo[i]; in jffs2_dynrubin_compress()
338 bits[1] += histo[i]; in jffs2_dynrubin_compress()
340 bits[0] += histo[i]; in jffs2_dynrubin_compress()
344 bits[i] = (bits[i] * 256) / mysrclen; in jffs2_dynrubin_compress()
345 if (!bits[i]) bits[i] = 1; in jffs2_dynrubin_compress()
346 if (bits[i] > 255) bits[i] = 255; in jffs2_dynrubin_compress()
347 cpage_out[i] = bits[i]; in jffs2_dynrubin_compress()
350 ret = rubin_do_compress(256, bits, data_in, cpage_out+8, &mysrclen, in jffs2_dynrubin_compress()
368 static void rubin_do_decompress(int bit_divider, int *bits, in rubin_do_decompress() argument
377 init_decode(&rs, bit_divider, bits); in rubin_do_decompress()
397 int bits[8]; in jffs2_dynrubin_decompress() local
401 bits[c] = data_in[c]; in jffs2_dynrubin_decompress()
403 rubin_do_decompress(256, bits, data_in+8, cpage_out, sourcelen-8, in jffs2_dynrubin_decompress()