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

Excessive spaces when writing a binary file

Trying to write a binary file from a struct. Unfortunately, it is writing out excessive spaces since my strings are all 20 characters long. I would use pointers, but my textbook specifically states not to use pointers (i.e. Remember: Only use…
MrPickle5
  • 522
  • 4
  • 9
  • 31
1
vote
1 answer

Bad file size in video.dat in ns-2

I am using a tcl script which takes a movie file trace and convert it into binary file which is further used by the application agent in ns-2. Here is the code snippet of the script which converts the movie file trace into binary file: set…
user976754
  • 361
  • 1
  • 4
  • 19
1
vote
1 answer

reading, populating and writing a struct array to a binary file

This program that I am doing for class to create an EMPLOYEE records file. I created two structs. One called employee and one called date. The EMPLOYEE struct has one char array, one int, 6 float values and DATE(another Struct). The DATE struct has…
Michael Brooks
  • 489
  • 4
  • 15
1
vote
1 answer

Convert .class files to binary files?

When compiling a '.java' file it will create a new '.class' file, which is not a pure binary file. To run this file you need an interpreter called 'java'. Is there a way to convert this '.class' file to a binary file? In which you don't need…
user181464
1
vote
1 answer

Read binary data in TSQL through HTTP GET

I need to export some images into my SQL Server through HTTP URL. I've found article about exporting of XML data: sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE; GO Declare…
Roman Badiornyi
  • 1,509
  • 14
  • 28
1
vote
2 answers

Read blocks of a binary file buffer into different types

I am trying to read a binary file into memory, and then use it like so: struct myStruct { std::string mystring; // is 40 bytes long uint myint1; // is 4 bytes long }; typedef unsigned char byte; byte *filedata = ReadFile(filename); //…
LordAro
  • 1,269
  • 3
  • 18
  • 35
1
vote
3 answers

Writing a C# Variable Length Structure to Binary and Reading it in in C++?

Okay, so i am continuing to work on my little game engine to teach me C#/C++ more. Now i am attempting to write a way of storing data in a binary format, that i created. (This is learning, i want to do this my self from scratch). What i am wondering…
UberJumper
  • 20,245
  • 19
  • 69
  • 87
1
vote
4 answers

Structures packing/unpacking class design

I'm implementing binary file format (~15 different structures) reader/writer and i have a bit dilemma which design pattern i should use. Each structure contains method for pack/unpack: class Struct1: def pack(): …
petrs
  • 405
  • 5
  • 10
1
vote
1 answer

Convert the C Function to Perl

I am stuck while trying to convert the C function convertCNGFileToJPGFile mentioned in the program cng2jpg.c I have been trying to write the same in Perl but don't have enough knowhow with hex,pack and unpack functions. Would really appreciate if…
Kunal Jha
  • 2,102
  • 4
  • 24
  • 34
1
vote
3 answers

String representation of binary data?

What is the correct term for the characters seen…
David Savage
  • 1,562
  • 2
  • 18
  • 35
1
vote
2 answers

Serialization for data files in .Net and other applications

I read a lot of discussion about serialization technologies that are used over the wire- xml, json, proto buf, Contract serializer etc. I'm curious about any discussions on what serialization tech might work best for an application file, ie a local…
Brady Moritz
  • 8,624
  • 8
  • 66
  • 100
1
vote
1 answer

How to know if record read from binary file has empty fields? C++

I am in high school and it is mandatory to use Turbo C++ compiler, I know it is a very old compiler but please understand my situation. So I was writing a code on a employee database. The code snippet: userdb user; fstream…
Ishan Sharma
  • 6,545
  • 3
  • 16
  • 21
1
vote
1 answer

How do you reject a Binary on the Amazon App Store?

I just submitted a binary for an update to an existing app on the amazon app store and realized there was a mistake in it. I went to reject it but I see no way to do it once I've hit submit. Any ideas on how I can reject the Bianry of the app update…
nickthedude
  • 4,925
  • 10
  • 36
  • 51
1
vote
1 answer

Download & Upload using Greasemonkey & PHP

I need to transfer a file (.zip) from a clients third-party-website to mine. GM-Snippet (commented out other trys) GM_xmlhttpRequest({ method: "GET", url: dlurl, timeout:0, onload: function(resp) { var…
James Cameron
  • 1,681
  • 25
  • 40
1
vote
1 answer

Convert long string to integer without parseLong or parseInt

Here's is the situation ... i have a binary file which contains 32-bit binary strings of characters (e.g 1011011100100110101010101011010 ) and i want to convert this to integer ... I have already tried to do it with parse-Int but if the most…