Another option is to look at vec which is a little more general and may give you access to a column represented in the binary file without unpacking. I have no deep knowledge of which is the better approach and using pack as above is certainly a good option.
Sometimes I can think of 6 impossible LDAP attributes before breakfast.