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
4 answers

Reading binary text into array?

I have a program that I need to read binary text into. I read the binary text via a redirection: readData will be an executable made by my Makefile. Example: readData < binaryText.txt What I want to do is read the binary text, and store each…
user200081
  • 563
  • 2
  • 12
  • 24
1
vote
0 answers

Writing a calendar to text file without overwriting previous data C

I am asked to implement a calendar using structures and files. I succeeded in implementing it using structures. However, I have to build on top of my program in order to handle files as well. The main idea that seemed challenging is how can I write…
user1680944
  • 537
  • 2
  • 13
  • 23
1
vote
3 answers

0x00 in a binary file VB.NET

UPDATED BELOW I am reading a Binary file using BinaryReader in VB.NET. The structure of each row in the file is: "Category" = 1 byte "Code" = 1 byte "Text" = 60 Bytes Dim Category As Byte Dim Code As Byte Dim byText() As…
Brian
  • 433
  • 1
  • 7
  • 16
1
vote
1 answer

How to save a boost::multi_array to a file

I'm looking for a simple way to save to and load from a file a 3D boost::multi_array. As far as I know there is no methods in the Boost library which I find odd. I don't need the file to be human readable, so a binary file would be better for…
Félix Cantournet
  • 1,941
  • 13
  • 17
1
vote
2 answers

Why opening a FileOutputStream to a binary file corrupts it?

I need to check whether given binary file has write access or not. File class API has a bug and its fixed in JDK7 but I can not just upgrade to it. Here is the link to the bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6203387 When I open…
1
vote
0 answers

Load binary files with DataReader in windows 8

I'm trying to convert an old game of mine to windows 8 and I'm having a lot of trouble with my file loading. I'm trying a simple test with DataReader but I don't get the correct values. First I write like this: StorageFolder folder =…
MilleB
  • 1,470
  • 2
  • 19
  • 32
1
vote
2 answers

C++ Binary file reading

I'm trying to keep objects including vectors of objects in a binary file. Here's a bit of the load from file code: template void read(T* obj,std::ifstream * file) { file->read((char*)(obj),sizeof(*obj)); …
1
vote
2 answers

Getting binary file out of the iPhone

My iPhone app is creating a binary file (up to 20MB). I would like to save this binary file and export it to my Mac. This is strictly for development NOT for submitting to the App Store. Any suggestions/recommendations on best practice for this? …
MobileDev
  • 3,750
  • 4
  • 32
  • 35
1
vote
0 answers

File IO with a records based protocol in Python

Ok - First attempt posting to stackOverflow... but I'm searched everywhere, cannot find an answer, am sure I'm on the wrong track, and feel this is a question with general applicability, so here goes. I deal with a lot of different instruments with…
1
vote
1 answer

Binary read, reinterpret_cast and endianness

I'm currently dealing with endianness-related problems. Let's assume that I have a big-endian file in a big-endian system. The first value in this file is 2882400152 = 0xABCDEF98 which is an integer 4. To read that value in an integer 4, _myint4, I…
Vincent
  • 57,703
  • 61
  • 205
  • 388
1
vote
1 answer

Reading binary files from assets using ObjectInputStream

I've recently decided to convert my 3d model format over to a binary file instead of ASCII in the hope of a speed increase... I read some java tutorials and the simplest way of reading my format seems to be using the ObjectInputStream and a mixture…
Kalisme
  • 518
  • 1
  • 10
  • 19
1
vote
3 answers

How can I process a binary file of fixed length records with no line breaks in between?

I have a text file that's composed of fixed length records but all in one line with no line breaks in between. What's the best way to process it in Perl? Thanks!
celcia
1
vote
1 answer

LUA - Read a binary file bit by bit

You can read a binary file byte by byte using f:read(size) in which size represent the number of byte but how can I read it bit by bit ? (1/8 of byte or octet if you want) It's ok for most of the data Int8(1),Uint16(2),Uint32(4),Int*(4) But for…
4nti7rust
  • 116
  • 10
1
vote
2 answers

Reading binary files in C++

I am trying to write a program that reads in binary files using C++. I am running into some unusual output that I was hoping for some help with. I have a binary file that starts with these 4 bytes: A1 B2 C3 D4 (verified using hexdump -C) And here is…
Hunter McMillen
  • 59,865
  • 24
  • 119
  • 170
1
vote
1 answer

SGABIOS compilation errors

I am attempting to build SGABIOS on my Macbook Pro. Unfortunately, I am getting some strange compilation errors that I am not familiar with. When I attempt to run make, here is the output I get: Ajax-2:sgabios-read-only dash$ make rm -f .depend cc…
Eicos
  • 35
  • 7