Rect pack/unpack for BinaryPacker.js