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

Compare int to character constant in Java

I have a binary file that uses sets of 4 chars to form integers that have "meaning". For example, the 4 bytes '0005', which equals 808464437 in integer form. I'd rather represent these in my Java code as '0005' rather than 808464437. I also don't…
crush
  • 16,713
  • 9
  • 59
  • 100
7
votes
1 answer

Is it possible to call loadstring on string of lua bytecode that contains a reference to a C function?

We are using the Love2d Lua game engine that exposes a graphics api to Lua. We are trying to serialize a giant hash table that contains all the save game data for the game world. This hash includes some functions, and some of these functions call…
davidscolgan
  • 7,508
  • 9
  • 59
  • 78
7
votes
2 answers

Full-text search on MongoDB GridFS?

Say, if I want to store PDFs or ePub files using MongoDB's GridFS, is it possible to perform full-text searching on the data files?
ikevin8me
  • 4,253
  • 5
  • 44
  • 84
6
votes
6 answers

Key/Value database for storing binary data

I am looking for a lightweight, reliable and fast key/value database for storing binary data. Simple without server. Most of popular key/value databases like CDB and BerkeleyDB does not natively store BLOB. What can be the best choice that I…
Googlebot
  • 15,159
  • 44
  • 133
  • 229
6
votes
2 answers

How to select with a binary field ? (php,mysql)

Try to select use "where" clause in a mysql statement: e.g. Table: X with a ID column which is BINARY data type. Then save in a variable in php $aid = $row["id"]; How do i use this variable later when I try to select from table $where = "where `ID`…
jebberwocky
  • 1,123
  • 3
  • 11
  • 24
6
votes
1 answer

What data type is suitable to handle binary data in ActiveX method?

I'm writing an ActiveX control for my friend, that should encapsulate encryption routines. It will be used from VB6 primarily. What data type should I choose for binary data like encryption key, initialization vector, input and output data so that…
Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
6
votes
8 answers

How do "binary" numbers relate to my everyday programming?

I am trying very hard to develop a much deeper understanding of programming as a whole. I understand the textbook definition of "binary", but what I don't understand is exactly how it applies to my day to day programming? The concept of "binary…
Jonathan Coe
  • 1,485
  • 4
  • 18
  • 36
6
votes
1 answer

How to preserve sensitive information in Client-Side-Binary?

I look forward to develop an Android / iPhone application, those will be using a private API (Non-Free) with embedded client-key. Now, since it is possible to reverse-engineer application binaries and scrap out strings. I am worried of losing my…
Yugal Jindle
  • 44,057
  • 43
  • 129
  • 197
6
votes
3 answers

Inserters and Extractors reading/writing binary data vs text

I've been trying to read up on iostreams and understand them better. Occasionally I find it stressed that inserters (<<) and extractors (>>) are meant to be used in textual serialization. It's a few places, but this article is a good…
6
votes
4 answers

Why is 44100 in hex in reversed order in hex editor?

I opened a wave file through hex editor. I tried two hex editors, and both put 44100 in hex (AC44) in reversed order. Why is that? For ASCII characters, "fmt", the ordering is natural. This is AC44. Does this have to do with Big-Endian /…
CppLearner
  • 16,273
  • 32
  • 108
  • 163
6
votes
1 answer

How to write raw type / bytes to stdout?

I am struggling for quite some time with outputting a raw type to standard output. Here is what I tried and did not work the desired way: r <- as.raw(c(0x41, 0x00, 0x43)) # r = "A\0C" cat(rawToChar(r)) # displays warning and skips data after NULL…
eold
  • 5,972
  • 11
  • 56
  • 75
6
votes
1 answer

When I open a Salesforce Attachment it is downloaded but the pdf is empty

I am getting the attachment body using the Rest API. var config = { method: 'get', url: '/services/data/v48.0/sobjects/Attachment/00PD000000HQD68MAH/Body', headers: { …
6
votes
2 answers

How can i convert binary codes to png image in qml?

In qml, i am using xml file to get some information from server. In this xml file there is a field as < image>iVBORw0KGgoAAAANSUhEUgAAA2AAAALKCAYAAABUYjK........< /image>. I am using XmlListModel and ListView for other field but how can i convert…
Gürcan Kavakçı
  • 562
  • 1
  • 11
  • 24
6
votes
4 answers

Read binary file in C# from specific position

Is it possible to read a large binary file from a particular position? I don't want to read the file from the beginning because I can calculate the start position and the length of the stream I need.
Skuami
  • 1,422
  • 2
  • 14
  • 28
6
votes
2 answers

StreamReader and binary data

I have this text file what contains different fields. Some fields may contain binary data. I need to get all the data in the file but right now when using StreamReader then it wont read the binary data block and data what comes after that. What…
hs2d
  • 6,027
  • 24
  • 64
  • 103