code: support unaligned offsets