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

Saving binary date into file in c++

My algoritm produces stream of 9bits and 17bits I need to find solution to store this data in file. but i can't just store 9 bits as int and 17bits as int_32. For example if my algoritm produces 10x9bit and 5x17bits the outfile size need to be…
Dymsza
  • 11
  • 3
0
votes
1 answer

How to call the factor level of a variable for each observation, and use those values to create a new variable in R?

I have a dataset with a categorical variable hospital_code which has 10 levels. The program that I am running loops through and takes a subset of the data such that the variable compLbl contains exactly 2 of the 10 hospital_codes so that they can…
Skye
  • 13
  • 5
0
votes
3 answers

Download file from filestream

I have a field in database of type image which stores the file in binary format. Now I want to give a facility to user from where the user can downlaod that file. I have the file data in byte array object. How can I display the open save dialoge box…
Rohit Vyas
  • 1,949
  • 3
  • 19
  • 28
0
votes
2 answers

How to quickly copy a part of binary file?

I need to do some operations in the middle of a binary file (change string value, boolean or int32) and leave everything else as it was. How can I quickly skip items I don't need to work with and get right to what I need without processing every…
user1306322
  • 8,561
  • 18
  • 61
  • 122
0
votes
1 answer

Image in Memory as div background-image

I'm doing all of this in a DotNetNuke module. I have some images that I load from a database as byte data. Originally, I was converting the byte data to a Drawing.Image, resizing it, then converting it back to a byte before doing a…
Mitchell
  • 253
  • 1
  • 5
  • 16
0
votes
1 answer

Lossless compression theory, is compression ratio based on size of pattern and times repeated?

I was wondering which of the following scenarios will achieve the highest ratio with lossless algorithms applied to binary data with repeated data. Am I correct to assume the compression ratio depends on patterns? Size Times repeated For example…
chineerat
  • 97
  • 2
  • 12
0
votes
1 answer

Returning binary content from a JPF action with Weblogic Portal 10.2

One of the actions of my JPF controller builds up a PDF file and I would like to return this file to the user so that he can download it. Is it possible to do that or am I forced to write the file somewhere and have my action forward a link to this…
Sebastien
  • 3,583
  • 4
  • 43
  • 82
0
votes
2 answers

Read binary C float in Actionscript 3?

I have binary C/C++ data types (e.g. in memory version of a C float) which I need to read into Actionscript 3 and would prefer not to code this from scratch. Anyone know of any libraries, sample code, pseudo code to help with this? For…
Brian
  • 752
  • 6
  • 10
0
votes
1 answer

Parsing blob from sqlite db

I need an advice regarding parsing a blob field from sqlite db. The field's content is a polygon information which I suppose is something like array of arrays. I started like this: NSData * theData = [[NSData…
Vanya
  • 4,973
  • 5
  • 32
  • 57
0
votes
1 answer

Bit Conversion trying to write into a stream

I have a string which represents a binary number: "1010", which represents a 10(ten) in decimal. I need to write this string into a Stream but keeping the binary format. When normally you want to write a string, .Net will save it converting the…
0
votes
1 answer

Growl for windows, custom subscriber - How to set notification properties in code? e.g. Sound

Trying to set certain properties for an applications notifications in Growl for Windows. (Properties being: duration, sticky, priority and sound)... So, for example, I'm creating a new application, giving it a name etc. Application application =…
JPThorne
  • 610
  • 11
  • 17
0
votes
1 answer

ASP.NET Webservice corrupts uploaded file

I have a webservice through which I can upload documents to our ASP.NET web site. The problem is when I upload PDF & word documents, they get corrupted when I try to open them. Text documents always upload fine. What is even strange is that on my…
Tawani
  • 11,067
  • 20
  • 82
  • 106
0
votes
1 answer

Reading binary bytes from string

I have a csv file with binary data inline with text (ie Text,0xFF00). I need to read in both values and save them into a database. Currently I'm using a StreamReader to read in the line and splitting it by the comma. The issue I'm having is I need…
Mike Lorenzana
  • 506
  • 4
  • 20
0
votes
1 answer

Entity Framework Code First Text Store as Image in SQL

I have a legacy SQL database that has a linked table to store specifications for order lines. The application designers use an image field in SQL to store the text as binary data. I mocked up an example below: public class OrderLine { public…
Pete
  • 2,393
  • 2
  • 24
  • 31
0
votes
1 answer

Twisted Large File and String Transfer

I was wondering if twisted offers any type of protocol that would be necessary for handling large data types (Around 10MB). I was using the line receiver to do other communication; however, that obviously isn't going to happen (string limits are…
jab
  • 5,673
  • 9
  • 53
  • 84