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

I want to read binary data from disk and save it in a Mercury variable. According to the string library, strings do not allow nested bytes of zero and store UTF-8 encoded content, so I don't think this will work. The best I’ve found so far is a line in the bitmap library that says: “Accessing the bitmaps as if they were an array of eight bit bytes is especially effective”

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

+3
source share
1 answer

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

+4
source

All Articles