What is a good data type for representing arbitrary binary data?

1.1k Views Asked by At

I want to read binary data from disk and store it in a Mercury variable. According to the string library, strings don't allow embedded null bytes and store content with UTF-8 encoding so I don't think that will work. The best I've found so far is a line in the bitmap library that says, "Accessing bitmaps as if they are an array of eight bit bytes is especially efficient"

Are bitmaps a good way to store arbitrary binary data? Is there something better?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, bitmaps are the recommended way to read/write/store binary data.