Lines Matching defs:quantity
14 unsigned int encode_rle(unsigned char * fileArr, unsigned int filePos, unsigned int quantity, unsigned char value);
326 The quantity and value will be described by either two or three bytes. If the
328 the quantity (run-length) and the following 8 bits are the value (index into
330 are the quantity and the following 8 are the value. Visually, the two possible
331 encodings are: (q = quantity, v = value)
340 encode_rle(unsigned char * fileArr, unsigned int filePos, unsigned int quantity, unsigned char value)
346 if (quantity < 128) {
347 fileArr[filePos] = single_mask | quantity;
350 fileArr[filePos] = double_mask | (quantity >> 8); // high 7 bits (plus mask)
351 fileArr[filePos+1] = (unsigned char) quantity; // low 8 bits