Questions tagged [binaryfiles]

A binary file is a computer file which may contain any type of data, encoded in binary form for computer storage and processing purposes.

A binary file is a computer file that is not a text file. It may contain any type of data, encoded in binary form for computer storage and processing purposes.

Many binary file formats contain parts that can be interpreted as text. for example, some computer document files, word file, office files, contain the text of the document but also contain formatting information in binary form.

Source: Wikipedia (Binary file)

2897 questions
1
vote
1 answer

How to convert base 64 string to array of bytes without data loss?

I have a base 64 string. I want to write is at as bytes of array to binary file(.dat) I used the following code to do that. Please refer. string s =…
Shafiq Abbas
  • 484
  • 1
  • 5
  • 18
1
vote
0 answers

Find the biggest chunks of same data in a binary file

I've a file that contains binary data. There is an error in generating the file and some data is written to the file more than once. Now I'm looking for a method to find big chunks of same datablocks in one file. I tried to figure it out with…
woodtluk
  • 935
  • 8
  • 20
1
vote
1 answer

Sharing Linux binaries

I’ve been wondering something for a long time. Is it sane to release ELF (32 and 64 bits) binaries in order people to use them? I know we better have to release sources – that’s what I’m used to doing – but I’d like to know what happens if I give a…
phaazon
  • 1,972
  • 15
  • 21
1
vote
3 answers

App crashes though I can't understand the reason

The input file is in.wav. I have to read chunks (succeeded) and to read samples to normalize the audio file... The problem is that it crashes while trying to fing the max and min values of .wav file's samples. It will just find the minimum value…
yulian
  • 1,601
  • 3
  • 21
  • 49
1
vote
1 answer

vbscript serialize integer to byte array

I want to write to a binary file the content of a vbscript variable that is a number. Is there any way to access the binary representation as a byte array? ( of integers, floats, etc). I have been trying to play with: Adodb.recordset object, append…
lc26
  • 23
  • 4
1
vote
0 answers

Matlab binary file to Fortran

I wrote a Matlab script that reads a binary file saved in FORTRAN (which happens to be the contents of a 4-D array). The array is stored in a Matlab variable. Next, I do the opposite operation, I wrote a Matlab script that writes the same exact 4D…
1
vote
1 answer

Matlab -> Python. Reading heterogeneous 1D binary array from disk

Say we have a simple, small file with a 1D array holding different value types, with a specific structure (first item is MATLAB uint, second value is MATLAB uint, and the rest of values are float) How can I read such an array of heterogeneous types…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
1
vote
1 answer

Trying to write a binary file, getting a text file

Trying to save my game by writing the game characters to a binary file. Unfortunately, my binary file is writing to the file as if it were a text file. If I just instantiate a string and call the save function for the string, it writes to the…
MrPickle5
  • 522
  • 4
  • 9
  • 31
1
vote
1 answer

Quicksort using a binary file of ints with duplicates. Having trouble with recursion

First off, I want to state that this is homework. Often times we'll have assignments that I'll post questions for after we've finished it and I'd like to continue working with it to improve my ability, but in this case I'm just stumped! We have…
Joshua
  • 4,270
  • 10
  • 42
  • 62
1
vote
2 answers

C++ loading data from part of a file

I want to keep a bunch of simple structures (just 3 ints per structure at the moment) in a file, and be able to read back just one of those structures at any given time. As a first step, I'm trying to output them to a file, then read them back using…
user673679
  • 1,327
  • 1
  • 16
  • 35
1
vote
1 answer

Read a file as binary data in JavaScript on the client side

As the question states, I'd like some way to read files on the client side using JavaScript (is there any other possible alternative?). These files(images mostly) are part of the webpage, and so I do not need access to the filesystem. So basically…
ffledgling
  • 11,502
  • 8
  • 47
  • 69
1
vote
1 answer

How to write members of a class to a binary file using cpp?

I'm writing a small back-end in cpp where I have to write some crossword data into a binary file. I have created an XWPuzzle class with all its data members public, and xWord is an object of this class. Here is the piece of code with which I'm…
artfuldev
  • 1,118
  • 1
  • 13
  • 25
1
vote
2 answers

Read and Write Binary files-FORTRAN and C++

I am writing binary file with the following code in FORTRAN: Character(50) S Real*8 A A = 25.002 OPEN(1,file='data.bin', access='stream',action='write') WRITE (1) A CLOSE(1) And trying to read that with the following code in…
VecTor
  • 83
  • 3
  • 13
1
vote
1 answer

Convert VB6 Open For Binary to VB.Net (Fixed String Array)

I am trying to convert a VB6 app that reads a binary file. I have listed the VB6 and the converted VB.Net code I am trying to use. I have tried everything I can think of and I either get Unable to read beyond the end of the stream or Cannot…
jocoder
  • 85
  • 8
1
vote
4 answers

Is there a BinaryReader in C++ to read data written from a BinaryWriter in C#?

I've written several ints, char[]s and the such to a data file with BinaryWriter in C#. Reading the file back in (in C#) with BinaryReader, I can recreate all of the pieces of the file perfectly. However, attempting to read them back in with C++…
Chris
  • 21,549
  • 25
  • 71
  • 99