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

Ruby: How can I write a digest to a file in binary format

I need to store a Digest::SHA512 object to a file in binary format. That seemed trivial, but whatever I try just write it as an hexadecimal string. I was expecting the following code to work: bindigest=digest.update(chall) File.open('sha1.bin',…
sbos61
  • 554
  • 2
  • 9
0
votes
1 answer

How to handle binary data in the browser when using byte range requests to server

I'm experimenting with controlled file requests. The browser will use byte-range requests to fetch pieces of large files from the server. This could be a video file or a large data file of some sort. I've been able to set up a simple fetch using the…
Nick Jennings
  • 3,853
  • 6
  • 30
  • 45
0
votes
3 answers

Save binarydata into a image file in c# / silverlight 3

byte[] binaryData = new Byte[pngStream.Length]; long bytesRead = pngStream.Read(binaryData, 0, (int)pngStream.Length); string base64String = System.Convert.ToBase64String(binaryData, …
Devphil
  • 295
  • 2
  • 10
  • 20
0
votes
0 answers

MIPS - Convert Word to Byte

I have (what I think) is a simple question. I have a value in a register in MIPS and I want to convert it from a word to a byte. So, for example: I have the value 123456 in register $t0 The actual value will be: 00000000 00000001 11100010 01000000 I…
user1661781
  • 327
  • 2
  • 16
0
votes
1 answer

Is this a good method for storing lists of items in an SQL Database?

This is just a very general database management question. Say I have a list of people, and I want to store a second list for each row in that table. Here is my solution. Table of Items that a person could possibly have; Table of people who have a…
Maurdekye
  • 3,597
  • 5
  • 26
  • 43
0
votes
1 answer

How to play realtime binary stream through client speakers in HTML5

I need help playing a binary stream to a client's speakers using the client's web browser. The stream is being recorded from a client's web browser and is sent to a NodeJS server using BinaryJS. I have successfully streamed the binary data back to…
0
votes
2 answers

Parse the osu! binary database in Java

As said in the title, I must read a binary file where specifications are written here : https://osu.ppy.sh/wiki/Db_(file_format)#collection.db It's written by a program written in C#. Except I don't have an idea on how to proceed to get the datas,…
bachrc
  • 1,106
  • 1
  • 12
  • 20
0
votes
3 answers

How to reduce time interval and average observations?

I have two columns of data: a time column in the format DD/MM/YY HH.MM and a column with binary data for each time cell, eg: Time Set 2015-01-02 14:39:35 0 2015-01-02 14:39:36 1 2015-01-02 14:40:11 0 2015-01-02 14:40:50 1 2015-01-04…
Anna Heebøll
  • 101
  • 2
  • 15
0
votes
2 answers

getting hexdata back from binary format in python

I'm trying to convert hexdata into binary and then back to hex. I'm getting hexdata but as byte object hexdata='91278c4bfb3cbb95ffddc668d995bfe0' b=binascii.a2b_hex(hexdata) print (b) …
fhulprogrammer
  • 599
  • 2
  • 7
  • 16
0
votes
0 answers

PDF Error Opening Error Retrieved From Database to Virtual Folder

I am trying to Retrieve Binary Data [PDF] From SQL Server to My Virtual Directory: string filePaths = System.Web.HttpContext.Current.Server.MapPath("~/TempPDF/"); And I have the following code to Write Data Into filePath, its downloading fine but…
ABM Abdul Muttalib
  • 195
  • 1
  • 2
  • 13
0
votes
2 answers

Reading specific parts of a binary file in Java

I have built a simple Java program to read data from FRX property files. The issue I am having however, is I need to be able to only read a certain part of the binary from the file. More specifically, I need to begin reading from the file at the…
HavelTheGreat
  • 3,299
  • 2
  • 15
  • 34
0
votes
0 answers

Error in Retrieving Binary Image using generic Handler

public class Handler : IHttpHandler { static DataTable dt; string url = ConfigurationManager.AppSettings["ServiceUrl"].ToString(); public void ProcessRequest(HttpContext context) { string id =…
0
votes
0 answers

Hidden Filed Value not maintained in asp.net

I am working in ASP.Net to download the Image and I use the following code: Code: Main Method: protected void btndownload_Click(object sender, EventArgs e) { FlyerBean objFlyerBean = SaveFlyer(); if (objFlyerBean ==…
Nikhil Vasdev
  • 183
  • 1
  • 3
  • 14
0
votes
1 answer

Finding erlang binary references

Erlang reference counts large binaries and created sub binaries which prevent the referenced binary from being deallocated during garbage collection. I can see the allocated binary amount in the observer or in erlang:memory() The problem is that…
Matt
  • 207
  • 1
  • 7
0
votes
2 answers

How to convert binary string to binary byte array in Java

I have binary string like this: String a = "100100". I need to have binary byte array: byte[] b = {1,0,0,1,0,0} for output. This is my code: String a="100100"; byte[] b = null; for (int i = 0; i < a.length(); i++) { …
user3698011
  • 167
  • 3
  • 14