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

Converting "1"s and "0"s to its binary equivalent to make a JPG

I want to re-convert a binary equivalent file which contains "1"s and "0"s back to its JPG format (or convert it back to binary) i.e i have a file which contains all 1's and 0's which i converted from a jpg image using the following function def…
Meet
  • 35
  • 1
  • 2
  • 3
0
votes
1 answer

struct.unpack for network byte order binary encoded numbers

I am totally new to Python. I have to parse a .txt file that contains network byte order binary encoded numbers (see here for the details on the data). I know that I have to use the package struct.unpack in Python. My questions are the…
Plug4
  • 3,838
  • 9
  • 51
  • 79
0
votes
1 answer

conversion to binary data from zip file in php

I am facing a critical requirement. Here I have to get binary formatted data from a .zip file provided. I need to get the data that is inside the .zip file, in a binary format to place these into a variable. I am really not sure, if at all this can…
Santanu
  • 7,764
  • 7
  • 26
  • 24
0
votes
3 answers

PHP - Get raw image data from image in a HTML document

How do i properly grab an image that is displayed in a HTML document and feed it to PHP to be read as image binary. I do not have direct access to the image file. The image i am trying to grab is fed to the client with HTML via PHP and printed in…
Alexander Johansen
  • 522
  • 1
  • 14
  • 28
0
votes
1 answer

Cascading hadoop streaming mapreductions with binary data

I'm having trouble to figure out how to use the binary output for a hadoop streaming mapreduction as the input for another hadoop streaming mapreduction. echo.py: import sys while True: buffer = sys.stdin.read(1024) if not buffer: break …
Igor Gatis
  • 4,648
  • 10
  • 43
  • 66
0
votes
2 answers

Create binary data using Ruby?

i was palying with the ruby sockets, so i ended up trying to put an IP packet togather, then i took an ip packet and try to make a new one just like it. now my problem is: if the packet is: 45 00 00 54 00 00 40 00 40 01 06 e0 7f 00 00 01 7f 00 00…
Raafat
  • 173
  • 3
  • 9
0
votes
1 answer

How to check if MTOM attachment is empty

I am developing webservice based on CXF. One of the requests is that client should be able to upload the optional PDF file as a part of message. This was pretty trivial: I have added this with getter and setter to my transfer…
Aleksander Gralak
  • 1,509
  • 10
  • 26
0
votes
2 answers

C socket making memory leak only with binary data

I am writing a web proxy, and it is working great with web pages that can be translated to ASCII text. However, when I try to view pages with binary data (Youtube.com is the one I've been using), there is a memory leak someplace, and the same few…
user1174511
  • 309
  • 3
  • 5
  • 15
0
votes
1 answer

Read binary file with C++ and translate some contents in it

I am trying to learn more about binary files, so I started with HexEdit, and I manually wrote a file and created a template for it. Here is my work: Now, I started working on a console application in C++ Win32 to read the contents in that file and…
Victor
  • 13,914
  • 19
  • 78
  • 147
0
votes
4 answers

Prompt for Saving File to Disk

Actually, I have saved a file in BinaryData in Sql and now I am able to download that file by converting the BinaryData into Bytes. My code is : object value = (sender as DevExpress.Web.ASPxGridView.ASPxGridView).GetRowValues(e.VisibleIndex, "ID"); …
RealSteel
  • 1,871
  • 3
  • 37
  • 74
0
votes
2 answers

How to Convert BinaryData to File in C#?

Actually I have saved some files like .pdf,.txt,.doc,.xls by converting them to in my SQL SERVER DB through FileUploadControl. Now, I want to Convert the back to Normal and give an option for user to Download (or) View…
RealSteel
  • 1,871
  • 3
  • 37
  • 74
0
votes
1 answer

How to Show a Binary Data in an Image

Actually, I have saved in Database by : HttpPostedFile PostedFile = Request.Files[m + 2]; byte[] fileData = null; using (var binaryReader = new BinaryReader(Request.Files[m + 2].InputStream)) { fileData =…
RealSteel
  • 1,871
  • 3
  • 37
  • 74
0
votes
1 answer

Cannot Insert Binary values into SQL Server 2008

I am inserting an image file and a sound file in one button click. I am calling two stored procedures for the task. But the problem is first the image is getting saved in the database and then the sound file is overwriting it. The sound file is not…
Chandrima
  • 1
  • 1
0
votes
0 answers

restful send binary data mith post nethod

how i can send binary data with post metht to RESTful api? i should upload document with restful api. the Description of the post Functions is. The (binary)content of the file should be sent as POST data. how i can do it? i try with the…
El_L
  • 355
  • 2
  • 8
  • 22
0
votes
1 answer

what is the format of a fltarr written to .dat

I don't really use IDL but am using a model written in IDL. I have some pre-established scripts that extract the output from .dat to .tif but now I would like to look at some intermediate files. Essentially the code is as follows: openw, 1,…
Dominik
  • 782
  • 7
  • 27