Questions tagged [binary]

The tag has no usage guidance.

5
votes
0answers
70 views

How to force the writing of buffers onto disk?

Usually, buffering is good; except when you critically need to write data to disk. Is there a way to force the writing of buffers onto disk? (I'm using a binary file) I believe a ...
3
votes
0answers
22 views

Does NumericArray always maintain data unmodified?

Suppose that we create a NumericArray using a LibraryLink function, then pass this to another one. Is NumericArray guaranteed to maintain the binary data as it was ...
2
votes
0answers
219 views

Converting hex string to ByteArray

With blockchain support, it should finally become straightforward to convert string hashes to ByteArray, but I still can't figure out the canonical Wolfram way of ...
1
vote
0answers
52 views

Read NumericArray from a file

Suppose I have a binary file which consists of a list of integer or real numbers. Let's say signed 8-bit integers; so each byte of the file is a single such integer. How can I read it and turn it into ...
1
vote
0answers
53 views

Efficiently transform sequentially generated integer matrices into boolean matrices

Assume you have a list of 5 numbers, eg L = {14, 7, 11, 14, 0};. Now, what you want to do with this list, is to transform each entry into eg a binary list, using <...
1
vote
0answers
146 views

The binary of negative integer number

I have a question about the binary of negative integer number in Mathematica. In most implementations, negative signed integers are stored in what is called two's complement. The other major way of ...
1
vote
0answers
36 views

Binary Image Size after import

I have a lot of binary images I would like to import into mathematica. Each of them is 132kB (1024x1024) big. Like the following: As soon as I import it into Mathematica however and call ByteCount[...
1
vote
0answers
49 views

Export 1bit Image

I have a binary image like the following one: How can I export it as an 1bit image instead of an 8bit one? If I export it in tiff it automatically becomes an 8bit one. Best, Max