Lines Matching defs:quantity
327 unsigned int quantity,
551 The quantity is described in the first byte. If the MSB is zero, then the next seven bits
552 are the quantity. If the MSB is set, bits 0-3 of the quantity are in the least significant bits.
553 If bit 5 is set, then the quantity is further described in the next byte, where an additional
554 7 bits (4-10) worth of quantity will be found. If the MSB of this byte is set, then an additional
555 7 bits (11-17) worth of quantity will be found in the next byte. This repeats until the MSB of
556 a quantity byte is zero, thus ending the chain.
559 If the MSB is set, then bits 5/6 describe the number of value bytes following the quantity bytes.
561 encodings are: (q = quantity, v = value, c = quantity continues)
572 encode_length(unsigned char * fileArr, unsigned int filePos, unsigned int quantity, unsigned int mask)
578 fileArr[filePos] = mask | (quantity & single_mask); // low bits (plus mask)
581 if (quantity >>= 4) {
583 fileArr[filePos] = quantity & double_mask;
586 while (quantity >>= 7) {
588 fileArr[filePos] = quantity & double_mask;
598 encode_rle(unsigned char * fileArr, unsigned int filePos, unsigned int quantity, union RunData * value, int depth)
605 slots_used += encode_length( fileArr, filePos, quantity, 0x80 );
610 slots_used += encode_length( fileArr, filePos, quantity, 0xA0 );
616 slots_used += encode_length( fileArr, filePos, quantity, 0xC0 );
623 slots_used += encode_length( fileArr, filePos, quantity, 0xE0 );