Questions tagged [binary-data]

Binary-data is information stored using a two character alphabet (typically written using 0 and 1)

Binary Data is information which is stored using a two character alphabet. For example, the number 42 could be stored as its base-2 representation: 101010.

In modern computers, almost all data is ultimately represented in binary form.

To be useful, the writer and reader of binary data must have a pre-agreed format (e.g. a file consisting of a 32-bit, two's compliment integer followed by three IEEE 754 floating point numbers).

The term is usually used to distinguish data stored in this way against data stored using a textual encoding. For example, the digits of 42 in base-10 (4 and 2) may be represented using ASCII as 00110100 and 00110010. Whether this is considered binary data or not depends on the task at hand; a chat client would consider messages as textual data, but the communication protocol it is built on may consider the same messages as arbitrary binary data.

1585 questions
0
votes
1 answer

C#, BinaryReader, 'Pull apart' binary file

I'm trying to use binaryreader to 'pull apart' and index a binary file but I need some help. I got this so far: using (BinaryReader b = new BinaryReader(File.Open(openRaw.FileName, FileMode.Open))) { int pos = 0; …
Felix
  • 89
  • 1
  • 12
0
votes
1 answer

How do I convert bytes to seconds?

I have a socket server listening for UDP packets from a GSM device. Some of the data comes in as multibytes, such as time, which requires multibytes for accuracy. This is an example: 179,248,164,14 The bytes are represented in decimal notation. My…
JohnMerlino
  • 3,900
  • 4
  • 57
  • 89
0
votes
0 answers

Read binary data written with octave

a is a simple 2x2 matrix in octave. I save it as binary data in data.bin: octave:42> save -binary data.bin a Now I would like to open the file and read the data from outside octave. I tried to use liboctave (do_load() and read_binary_data())…
nimig
  • 155
  • 1
  • 11
0
votes
2 answers

MD5 of file downloaded from database, from a JSONObject

My requirement is to compare the MD5 hashes of a file on the local disk and a file downloaded from a database. The file is stored on SQL Server in a VARBINARY(MAX) column. The file can be any type. I'm currently testing with a PDF file. I get the…
codewarrior
  • 984
  • 4
  • 18
  • 34
0
votes
1 answer

Unpacking data in python in struct library

When I pack the data to fixed length and then while unpacking I am unable to retrieve the data with out mentioning the actual length of the data. How do I retrieve only data without the \x00 characters without calculating the length in prior. >>>…
0
votes
0 answers

Which is better datatype to store binary data string or vector of char in c++

I have been working in a project to upload and download binary data, i have done uploading and downloading using binary data by storing them in string, but some says binary data should be stored in vector of char than string. I don't exactly find…
Charzhard
  • 783
  • 1
  • 7
  • 19
0
votes
1 answer

Simperium for syncing binary data using Core Data?

I'm using Simperium to sync instances of my app's data between each other. I went with this over iCloud because I've heard iCloud has a lot of issues with Core Data and as a novice to iOS, I believe Apple makes you pay to use their services (in a…
swiftcode
  • 3,039
  • 9
  • 39
  • 64
0
votes
1 answer

Read array of struct from binary data save by CArchive

I am trying to read data from a file which is being written by CArchive. I have the original source which is being used to read and write using CArchive. But, I am trying to read this through C# code. I am able to read much of the file, but I got…
fhnaseer
  • 7,159
  • 16
  • 60
  • 112
0
votes
2 answers

Integer can not be written as a string with correct form to binary file

I'm reading data from a database to write to a binary file and using the bcp command of Sybase to write big data to my new database in one go (or thousand by thousand etc.) You can see my entity IdNumbers are integer and I'm writing it to file as a…
htcdmrl
  • 194
  • 1
  • 10
0
votes
1 answer

Java libraries for reading meta data from .img, .osc and .mccd files

I need to read meta data from .img, .osc and .mccd files. Can you anyone recommend any libraries or provide any pointers as to how I would go about doing this. Eventually I need to put that meta-data into an XML file so it can be harvested by a…
Ankur
  • 50,282
  • 110
  • 242
  • 312
0
votes
1 answer

Read Binary Data from the server

Im looking to read the binary data coming from the java server like DataOutputStream dos = new DataOutputStream(response.getOutputStream()); //dos.writeInt(5); dos.writeUTF("some text"); dos.flush(); And in the iOS side [stream open]; Byte…
sajjeel
  • 29
  • 3
0
votes
3 answers

Performance in tables with binary data/images

I made a people maintenance screen. The client want me to store the photo of every person in the database, and I made it without problems. I have a separate table for the images with two fields, Id_person,and Image. I'm a little worried because it's…
Jonathan
  • 11,809
  • 5
  • 57
  • 91
0
votes
1 answer

ostringstream::write method modifies input parameter

Consider the following snippet which gets some binary data and writes it to an ostringstream object: unsigned char* payload; unsigned long size; GetData(&payload, &size); std::cout << md5(payload, size) << std::endl; std::ostringstream…
incrediblehulk
  • 409
  • 2
  • 11
0
votes
1 answer

What are those 32 bits near the start of a FLAC file?

I am trying to write a parser to extract information from the following FLAC file: $ hd audio.flac | head -n 6 00000000 66 4c 61 43 00 00 00 22 12 00 12 00 00 00 00 00 |fLaC..."........| 00000010 00 00 0a c4 42 f0 00 78 9f 30 00 00 00 00 00 00 …
authchir
  • 1,605
  • 14
  • 26
0
votes
2 answers

Embedding PDF in an MVC view from binary data

My issue is I'm currently receiving from a web service response a string that is the binary data of a PDF file. I need to display this PDF file embedded in an MVC view. I'm using C#. Any pointers are appreciated.
Gary2112
  • 1
  • 2
  • 1