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

Function encode_int32

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

Encode a 32-bit signed 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

22
23
24def encode_int32(number):
25 """
26 Encode a 32-bit signed integer as a 4-byte string
27 @param number
28 @return byte array of size 4 that represents the integer
29 """
30 return struct.pack('<i', number)
31
32
33def encode_uint32(number):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected