MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / encode_uint32

Function encode_uint32

src/ext/makerbot_driver/Encoder/Coding.py:33–39  ·  view source on GitHub ↗

Encode a 32-bit unsigned integer as a 4-byte string @param number @return byte array of size 4 that represents the integer

(number)

Source from the content-addressed store, hash-verified

31
32
33def encode_uint32(number):
34 """
35 Encode a 32-bit unsigned integer as a 4-byte string
36 @param number
37 @return byte array of size 4 that represents the integer
38 """
39 return struct.pack('<I', number)
40
41
42def decode_int32(data):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected