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?
source
share