module documentation
Undocumented
Function | add |
Record struct pattern that's been used for (de)serialization. |
Function | clear |
Clear record of struct pattern that have been used for (de)serialization. |
Function | compute |
Get struct pattern. |
Function | get |
Get record of struct pattern that have been used for (de)serialization. |
Function | int32 |
Pack int32. |
Function | int32 |
Unpack int32. |
Function | pack |
Create struct.pack call for when pattern is a string pattern. |
Function | pack2 |
Create struct.pack call for when pattern is the name of a variable. |
Function | reduce |
Optimize the struct format pattern. |
Function | serialize |
Return code to write expression to buffer. |
Function | unpack |
Create struct.unpack call for when pattern is a string pattern. |
Function | unpack2 |
Create struct.unpack call for when pattern refers to variable. |
Function | unpack3 |
Create an unpack call on the struct.Struct object with the name struct_var. |
Variable | _context |
Undocumented |
Get struct pattern.
Parameters | |
types | type names, [str] |
Returns | |
format string for struct if types are all simple. Otherwise, return None, str |
Unpack int32.
Parameters | |
var | variable name, str |
buff | Undocumented |
Returns | |
struct unpacking code for an int32 |
Create struct.pack call for when pattern is a string pattern.
Parameters | |
pattern | pattern for pack, str |
vars_ | name of variables to pack, str |
Create struct.pack call for when pattern is the name of a variable.
Parameters | |
pattern | name of variable storing string pattern, struct |
vars_ | name of variables to pack, str |
Optimize the struct format pattern.
Parameters | |
pattern | struct pattern, str |
Returns | |
optimized struct pattern, str |
Return code to write expression to buffer.
Parameters | |
expr | Undocumented |
expr str | string python expression that is evaluated for serialization |
Returns | |
python call to write value returned by expr to serialization buffer |
Create struct.unpack call for when pattern is a string pattern.
Parameters | |
var | name of variable to unpack, str |
pattern | pattern for pack, str |
buff | buffer to unpack from, str |
Create struct.unpack call for when pattern refers to variable.
Parameters | |
var | variable the stores the result of unpack call, str |
pattern | name of variable that unpack will read from, str |
buff | buffer that the unpack reads from, StringIO |