Lines Matching refs:bs
16 bs = fin.peek(1)[:1]
17 if len(bs) != 1:
18 return None, bs
19 return ord(bs[0]), bs
22 value, bs = peek_uint8(fin)
23 fin.read(len(bs))
24 return value, bs
27 bs = fin.peek(4)[:4]
28 if len(bs) != 4:
29 return None, bs
30 return ord(bs[0]) | ord(bs[1]) << 8 | ord(bs[2]) << 16 | ord(bs[3]) << 24, bs
33 value, bs = peek_uint32(fin)
34 fin.read(len(bs))
35 return value, bs
42 bs = fin.peek(n)[:n]
43 if len(bs) < n:
44 return None, bs
45 b = ord(bs[-1])
48 return value, bs
53 value, bs = peek_varuintN(fin)
54 fin.read(len(bs))
55 return value, bs
58 bs = ""
64 bs += chr(b)
66 return bs
69 bs = to_varuintN(value)
70 fout.write(bs)
71 return bs
74 magic_number, bs = peek_uint32(fin)
76 return magic_number, bs
79 magic_number, bs = peek_magic_number(fin, expected_magic_number)
80 fin.read(len(bs))
81 return magic_number, bs
84 version, bs = peek_uint32(fin)
86 return version, bs
89 version, bs = peek_version(fin, expected_version)
90 fin.read(len(bs))
91 return version, bs