binary-data Questions

3

Solved

I am writing an STL file which consists of an 80 byte header, a 4 byte integer, and then records of 50 bytes each consisting of floats and a short integer. Using a RandomAccessFile I can eas...
Adherence asked 4/11, 2017 at 15:26

3

Solved

Say that you have a string of bytes generated via os.urandom(24), b'\x1b\xba\x94(\xae\xd0\xb2\xa6\xf2f\xf6\x1fI\xed\xbao$\xc6D\x08\xba\x81\x96v' and you'd like to store that in an environment va...
Frankforter asked 11/6, 2017 at 2:23

2

Solved

I'm using awk to split a binary stream and I can get each part into a for loop like this. for(i=1;i<=NF;i++) I don't want to convert each field to text or arguments, but simply pass it directl...
Quentinquercetin asked 19/8, 2017 at 16:49

5

Solved

I have a twenty byte hex hash that I would like to store in a django model. If I use a text field, it's interpreted as unicode and it comes back garbled. Currently I'm encoding it and decoding i...
Seigler asked 5/2, 2009 at 18:51

2

Solved

In Swift 3.x, we usually handle binary data using Data; from it you can generate most other important types, and there are useful functions on it. But how do I create a Data from an InputStream? I...
Gallon asked 2/3, 2017 at 16:40

2

Solved

In the Erlang shell, I can do the following: A = 300. 300 <<A:32>>. <<0, 0, 1, 44>> But when I try the following: B = term_to_binary({300}). <<131,104,1,98,0,0,...
Mcleroy asked 30/5, 2012 at 17:8

1

Solved

I have some large binary content in hex form stored in a CLOB and want to convert that to a BLOB where the hex code is actual binary byte encoding: DECLARE -- This would be my 8 byte hex-encoded...
Drin asked 2/2, 2017 at 12:54

4

Solved

How would you extract the Server Name Indication (SNI) from a TLS Client Hello message. I'm currently struggling to understand this very cryptic RFC 3546 on TLS Extensions, in which the SNI is defi...
Condemnation asked 24/7, 2013 at 11:24

2

Solved

I have some experience with Pragmatic-Programmer-type code generation: specifying a data structure in a platform-neutral format and writing templates for a code generator that consume these data st...
Cunaxa asked 14/3, 2011 at 23:20

1

Solved

I have an array of integers Array ( [0] => Array ( [0] => 1531412763 [1] => 1439959339 [2] => 76 [3] => 122 [4] => 200 [5] => 4550 [6] => 444 ) ... And so on, I...
Splenius asked 4/10, 2016 at 12:1

5

Solved

Say I have 8b1f 0008 0231 49f6 0300 f1f3 75f4 0c72 f775 0850 7676 720c 560d 75f0 02e5 ce00 0861 1302 0000 0000 How can I easily get a binary file from that without copying+pasting into a hex edito...
Somehow asked 27/4, 2009 at 19:17

1

Solved

I am trying to find and replace binary values in strings: $str = '('.chr(0x00).chr(0x91).')' ; $str = preg_replace("/\x00\x09/",'-',$str) ; But I am getting "Warning: preg_replace(): Null byte i...
Fief asked 20/9, 2016 at 19:59

8

I am trying to build a PDF file out of a binary stream which I receive as a response from an Ajax request. Via XmlHttpRequest I receive the following data: %PDF-1.4.... ..... ....hole data repres...
Divinity asked 13/10, 2012 at 18:57

1

Solved

There appear to be some similar-looking long alphanumeric strings that commonly occur in Mach-O 64 bit executables and ELF 64-bit LSB executables among other symbols that are not alphanumeric: ca...
Sclar asked 5/9, 2016 at 0:13

5

Solved

I have a binary stream on standard input, it's in a fixed size format, a continuos stream of packets, each packet has a header with length X and a body with length Y. So if X=2 Y=6 then it's somet...
Euphrates asked 16/8, 2011 at 15:36

4

Solved

It seems to me one ought to be able to process binary data with DCGs on a list of bytes. To make it work generally, though, one has to use bitwise operations which means is/2 is involved, which mea...
Podophyllin asked 31/10, 2014 at 21:35

3

I'm developing a json rest web service that will be consumed from a single web page app built with backbone.js This API will let the consumer upload files related to some entity, like pdf reports ...
Silage asked 19/1, 2013 at 14:33

4

Solved

I am trying to extract data out of a byte object. For example: From b'\x93\x4c\x00' my integer hides from bit 8 to 21. I tried to do bytes >> 3 but that isn't possible with more than one byte...
Campagna asked 3/1, 2014 at 18:47

3

Solved

Is there any reason for this behavior/implementation ?Example: $array = array("index_of_an_array" => "value"); class Foo { private $index_of_an_array; function __construct() {} } $foo = new ...
Solvency asked 29/4, 2016 at 8:53

1

Solved

Let's say I have an ArrayBuffer which is an mp4 file. I'd like to create a new ArrayBuffer with a few extra bytes to be used as header information, and then store the mp4 buffer in the remainder of...
Yettie asked 29/3, 2016 at 12:17

4

Solved

I don't understand the format of unformatted files in Fortran. For example: open (3,file=filename,form="unformatted",access="sequential") write(3) matrix(i,:) outputs a column of a matrix into ...
Florrieflorry asked 5/1, 2012 at 23:3

3

Solved

I have a column with type binary(16) not null in a mysql table. Not all records have data in this column, but because it setup to disallow NULL such records have an all-zero value. I want to exclu...
Frontier asked 8/3, 2016 at 20:13

2

As the Documentation says, "DumpSave writes out definitions in a binary format that is optimized for input by Mathematica." Is there a way to convert a Mathematica binary dump file back to the list...
Yielding asked 5/8, 2011 at 9:2

4

Solved

Well i have a byte array, and i know its a xml serilized object in the byte array is there any way to get the encoding from it? Im not going to deserilize it but im saving it in a xml field on a s...
Melisent asked 24/2, 2009 at 10:55

6

Solved

I am looking for a lightweight, reliable and fast key/value database for storing binary data. Simple without server. Most of popular key/value databases like CDB and BerkeleyDB does not natively st...
Pediform asked 21/3, 2012 at 11:8

© 2022 - 2024 — McMap. All rights reserved.