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

Java binary files writeUTF... explain specifications

I'm studying Java on my own. One of the exercises is the following, however I do not really understand what it is asking to.... any smart java gurus out there that could explain this in more detail and simple words? Thanks Suppose that you have a…
user69514
  • 26,935
  • 59
  • 154
  • 188
0
votes
1 answer

c# Convert.To/FromBase64String confusion

Assuming I have this Method. private static void Example(string data) { Console.WriteLine("Initial : {0}", data); data = data.PadRight(data.Length + 1, '0'); Console.WriteLine("Step 1 : {0}", data); data =…
0
votes
1 answer

Write binary file database C#

my concern is that, im trying to make a program that will show up let's say images of cars to create a collection. I'm using windows forms and i have made the grapchical interface i want. The thing is i have a xml file (like database) with 300…
Shiroe
  • 65
  • 1
  • 1
  • 10
0
votes
1 answer

Initializing Julia type with many fields containing data from binary file

I have a type with many fields (think hundreds). The constructor system in Julia is fine for when I'm working with small types, but you can imagine how unwieldy this gets when I'm working with a massive object: type Bar a:Int32 b:Int32 …
William
  • 521
  • 7
  • 21
0
votes
1 answer

How can I do a CIDR query on SQL Server Binary Column Type

I have a need to store both IPv6 and IPv4 addresses in such a way they can be ordered and searched in a SQL Server DB more or less using CIDR notation. I'm intending to use binary(16), with IPv4 encoded as IPv4-mapped-IPv6 so there is one single…
0
votes
1 answer

Parsing network protocols using meta-programming in Go

In JavaScript (Node), I've written a module which accepts a list of fields and their types and returns an object with pack and unpack methods. Below is the code to pack and unpack IPv4: var ipv4 = proto.add('struct', { name: 'IPV4', fields: { …
jpillora
  • 5,194
  • 2
  • 44
  • 56
0
votes
1 answer

Arduino Binary to decimal conversion

I am using Arduino to read a 80 bit serial sync binary code, using a digital bin for incoming data and one for timing as latch for when to read a digital data pin. I have converted the input data to TTL and stored into a fixed length (100) array .…
user2264535
  • 17
  • 1
  • 1
  • 2
0
votes
1 answer

Pass Binary Data with WebSocket

I'm writing a Firefox extension and I'm searching to pass a zipped file with a WebSocket (server here). The code is the following for the client side (that send the file): var ws = new window.WebSocket("ws://localhost:12345"); function…
hasmet
  • 758
  • 3
  • 13
  • 32
0
votes
1 answer

Incrementing binary value (unsigned char)

I am currently in the process of creating a simple bitcoin miner in c++, and need some help optimizing part of it. I have a string in hexadecimal value, which is parsed into binary (code below) due to the need to run the OpenSSL sha256 hashing…
Jacob
  • 3,521
  • 6
  • 26
  • 34
0
votes
1 answer

Move table from server1 to server2

I have two Postgresql servers (Windows), and I am trying to transfer a table from server1 to server2. This table is around 200 MB size as it contains binary data. I want to put the table into a usb stick and then move it to the second server.…
Aan
  • 12,247
  • 36
  • 89
  • 150
0
votes
2 answers

Send a value by socket and read the value by reader.ReadInt32() changes value

I am trying to send a value by socket .So i have two parts in my project Client and server . The client sends a value to server using this code : System.IO.BinaryWriter binaryWriter = new System.IO.BinaryWriter(networkStream); …
Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180
0
votes
2 answers

Making a dataframe with binary data based on conditions in another

I have a large data frame which I want to filter and make a binary data frame for based on several conditions. This is the original data frame: a1 <- data.frame( ID = c(rep("ID_1",3),rep("ID_2",3)), gene = c("A", "D", "X","D","D","A"), C =…
paul_dg
  • 511
  • 5
  • 16
0
votes
1 answer

What does "zero bit padding in the end" mean

I am trying to debug a 3d file format exporter which sometimes exports files that aren't working everywhere(some programs open them some don't). While I was reading the documentation there seems to be a line that I cannot wrap my head around: 6.4…
Anton Banchev
  • 541
  • 8
  • 28
0
votes
2 answers

Binary data to string conversion issue

I'm having trouble converting binary data (some text) back to a string. The original text comes from a JSON feed, and is then convertet into binary data to store (with the correct formatting) in CoreData. My problem is getting it back out of…
Chris
  • 7,830
  • 6
  • 38
  • 72
0
votes
2 answers

Is it possible to retrieve parts of a large binary file via Javascripts xhr based on offset and length?

I'm writing a handler for accessing binary data. Currently I'm doing this: ... d = new FileReader(); d.onload = function (e) { var response_buffer, data, byte_len, temp_float; response_buffer = e.target.result; data = new…
frequent
  • 27,643
  • 59
  • 181
  • 333