I'm trying to CBOR encode contents of a binary file so that it can be decoded by Java into a byte array. When I do 'open(path + filename) { |file| file.read }.to_cbor' I get a String after decoding in Java. When I do 'open(path + filename) { |file| file.read }.bytes.to_a.to_cbor' I get an ArrayList after decoding in Java. What's the correct way to use this library so the binary file contents are encoded as a byte array?
I'm trying to CBOR encode contents of a binary file so that it can be decoded by Java into a byte array. When I do 'open(path + filename) { |file| file.read }.to_cbor' I get a String after decoding in Java. When I do 'open(path + filename) { |file| file.read }.bytes.to_a.to_cbor' I get an ArrayList after decoding in Java. What's the correct way to use this library so the binary file contents are encoded as a byte array?