how to use binary data in ruby