Skip to content

Commit 9426432

Browse files
committed
fix whitespace
1 parent d5f4ff0 commit 9426432

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bit/bytes_int_conversion.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,23 @@ def int_to_bytes_big_endian(num):
99
num >>= 8
1010
return bytes(bytestr)
1111

12+
1213
def int_to_bytes_little_endian(num):
1314
bytestr = []
1415
while num > 0:
1516
bytestr.append(num & 0xff)
1617
num >>= 8
1718
return bytes(bytestr)
1819

20+
1921
def bytes_big_endian_to_int(bytestr):
2022
num = 0
2123
for b in bytestr:
2224
num <<= 8
2325
num += b
2426
return num
2527

28+
2629
def bytes_little_endian_to_int(bytestr):
2730
num = 0
2831
e = 0

0 commit comments

Comments
 (0)