keep length information for records
return keys and values as byte arrays, not strings