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

Fetching binary value from MSSQL and SELECTing fetched value in python

I'm required to fetch a value from TableA that is represented in binary(20), save this to a variable sha1_bin, pass it to another function, which retrieves information from TableB using said sha1_bin. When I get the binary value, for instance the…
Daedalus Mythos
  • 565
  • 2
  • 8
  • 24
0
votes
1 answer

Bit shifting a bit array and binary math for SHA-1

I am posting for a sanity check so please forgive me if this sounds a little basic. I am trying to learn more about encryption so I figured a good starter project would be implement the Sha-1 hashing algorithm. I found a walk-through and have hit a…
krtzer
  • 113
  • 1
  • 8
0
votes
1 answer

How do I convert 32b (four characters) from an int value to an ASCII string in python

Hi I have a 32b value that I need to easily truncate in to it's four bytes, convert each byte to ASCII and combine them to a four letter string. And I also need the reverse process. I have been able to do this in one direction in the following ugly…
8igby
  • 3
  • 1
0
votes
1 answer

REST service with binary data

I want to create Restful service which can accept binary data. I've implemented javax.xml.ws.Provider interface, but i can't get content of request. If I use javax.xml.ws.Dispatch then its send only XML data, but I need transfer binary data. Please…
user179437
  • 713
  • 1
  • 7
  • 16
0
votes
1 answer

JQuery get image data? Is this blob?

I'm editing an existing system to pass an image from the server file system to an api. I get the image data like so: $.get("image.png", function(data) { document.write(data) }); The result is something like this: �PNG …
Orane
  • 2,223
  • 1
  • 20
  • 33
0
votes
2 answers

Convert Binary String to its readable equivalence C#

I have a string array that contains some binary data, and I would like to convert the binary to its equivalent character representative. Each element inside the array contains 8 bit "1 byte" of data and I need to know how to convert it to its…
WT86
  • 823
  • 5
  • 13
  • 34
0
votes
0 answers

How to read and interpret binary data file with unknown format of data in it?

I have data file which looks like this image below. File is used by warehouse management software. It is custom-made software build with C or Assembler (I believe). It runs on windows machine. This file contains information such as what item is in…
Lukas Liesis
  • 24,652
  • 10
  • 111
  • 109
0
votes
2 answers

IndexOutOfRangeException when a stream is a multiple of the buffer size

I don't have a lot of experience with streams and buffers, but I'm having to do it for a project, and I'm stuck on an exception being thrown when the stream I'm reading is a multiple of the buffer size I've chosen. Let me show you: My code starts…
dnord
  • 1,702
  • 2
  • 18
  • 34
0
votes
1 answer

Which one is the right way for moving mask through a binary image to make it smooth?

I am about to write a java program which can smooth an image (2D Array) by a 3 by 3 mask and hesitate about which of the following strategies is right for application of the mask to the image: 1- Apply the mask to a portion of the image and…
Mohammadreza
  • 450
  • 2
  • 4
  • 14
0
votes
0 answers

Does nginx supports websocket with binary

I'm testing nginx by sending binary data(byte[]) using websocket connection and it doesn't work correctly. I used the following settings. server { listen 80; client_max_body_size 2G; server_name oracleapps.veeralab.com; …
user1595858
  • 3,700
  • 15
  • 66
  • 109
0
votes
0 answers

Temporary header for output buffer in PHP

I convert binary data to JPEG. PHP is cool for this, because I need just to send header('Content-Type: image/jpeg;'); and echo my binary. But I have content above that binary like so: echo 123; header('Content-Type: image/jpeg;'); $data =…
Szymon Toda
  • 4,454
  • 11
  • 43
  • 62
0
votes
1 answer

Reading in image as binary for http server python 3.4

Alright first off I want to point out that no networking libraries can be used. The purpose of what I'm trying to do is learn how http 1.1 headers and data are to be served using string manipulation/conversions. In this case I'm trying to serve a…
0
votes
1 answer

TCP socket and binary data

How to send binary data (01110110 for exemple) with C# throught a TCP (using SSL) socket ? I'm using : SslStream.Write() and h[0] = (byte)Convert.ToByte("01110110"); isn't working
MD.
  • 1
  • 1
0
votes
1 answer

Sorting large, binary, fixed length records with QSORT

I would like to sort a big file which contains 20-byte (it's not a structure) binary records with a help of qsort. There are 800 000 000 records in the file. I have 2 questions: what is the best way to sort 20-byte records in a compare function of…
Alex K
  • 11
  • 1
0
votes
1 answer

How do you calculate Pairwise XOR?

How is pairwise XOR calculated ? I googled but could not find anything relevant. EDIT : How is it different from normal XOR?
Nitish Upreti
  • 6,312
  • 9
  • 50
  • 92