Bug Fix

The line
length = ord(offset[0]) + (ord(offset[1]) << 8) + (ord(offset[2]) << 16)
+ (ord(offset[3]) << 24)

will throw a type error as ord is being called on an int and not a
string.