decode a record more or less