parse a tuple of 3 uint8 values
3316
def uint8_3(self, name):
        """"""
        self._assert_is_string(name)
        frame = self._next_frame()
        if len(frame) != 3:
            raise MessageParserError("Expected exacty 3 byte for 3 unit8 values")
        vals = unpack("BBB", frame)
        self.results.__dict__[name] = vals
        return self
855867
def _uint2farray(ftype, num, length=None):
    """"""
    if num < 0:
        raise ValueError("expected num >= 0")
    else:
        objs = _uint2objs(ftype, num, length)
        return farray(objs)
61576
def uint32_to_uint8(cls, img):
        
        return np.flipud(img.view(dtype=np.uint8).reshape(img.shape + (4,)))
431333
public final Tuple8<T9, T10, T11, T12, T13, T14, T15, T16> skip8() {
        return new Tuple8<>(v9, v10, v11, v12, v13, v14, v15, v16);
    }
913607
def read_uint8(self, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.unpack('%sB' % endian)
913113
function tuple3Of(a, b, c) {
    var self = getInstance(this, tuple3Of);
    self.types = rest(arguments);
    return self;
}
252353
def _parse_vertex_tuple(s):
  """"""
  vt = [0, 0, 0]
  for i, c in enumerate(s.split('/')):
    if c:
      vt[i] = int(c)
  return tuple(vt)
799030
async def dump_uint(writer, n, width):
    
    buffer = _UINT_BUFFER
    for _ in range(width):
        buffer[0] = n & 0xff
        await writer.awrite(buffer)
        n >>= 8
260431
function UInt8(value, opt) {
	SingleType.call(this, value, 1, Buffer.prototype.readUInt8, Buffer.prototype.writeUInt8, opt);
}
509464
def parse_numtuple(s,intype,length=2,scale=1):
    ''''''
    if intype == int:
        numrx = intrx_s;
    elif intype == float:
        numrx = fltrx_s;
    else:
        raise NotImplementedError("Not implemented for type: {}".format(
            intype));
    if parse_utuple(s, numrx, length=length) is None:
        raise ValueError("{} is not a valid number tuple.".format(s));
    return [x*scale for x in evalt(s)];
291412
def _ParseTokenType(self, file_object, file_offset):
    
    token_type_map = self._GetDataTypeMap('uint8')

    token_type, _ = self._ReadStructureFromFileObject(
        file_object, file_offset, token_type_map)

    return token_type
363425
def uint8(self, val):
        """"""
        try:
            self.msg += [pack("B", val)]
        except struct.error:
            raise ValueError("Expected uint32")
        return self
38947
def BE8(value, min_value=None, max_value=None, fuzzable=True, name=None, full_range=False):
    ''''''
    return UInt8(value, min_value=min_value, max_value=max_value, encoder=ENC_INT_BE, fuzzable=fuzzable, name=name, full_range=full_range)
617090
function hexToBytes(hex) {
    var arr = new Uint8Array(Math.ceil(hex.length / 2));
    for (var i = 0; i < arr.length; i++) {
        arr[i] = parseInt(hex.substr(i * 2, 2), 16);
    }
    return arr;
}
784549
def LE8(value, min_value=None, max_value=None, fuzzable=True, name=None, full_range=False):
    ''''''
    return UInt8(value, min_value=min_value, max_value=max_value, encoder=ENC_INT_LE, fuzzable=fuzzable, name=name, full_range=full_range)
24046
def parse_buffer_to_ppm(data):
    

    images = []

    index = 0

    while index < len(data):
        code, size, rgb = tuple(data[index:index + 40].split(b'\n')[0:3])
        size_x, size_y = tuple(size.split(b' '))
        file_size = len(code) + len(size) + len(rgb) + 3 + int(size_x) * int(size_y) * 3
        images.append(Image.open(BytesIO(data[index:index + file_size])))
        index += file_size

    return images
524840
def write_uint8(self, value, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.pack('%sB' % endian, value)