binary

How to analyze binary file?

I have a binary file. I don't know how it's formatted, I only know it comes from a delphi code. Does it exist any way to analyze a binary file? Does it exist any "pattern" to analyze and deserialize the binary content of a file with unknown format? ...

Extract history from Korn shell

I am not happy about the history file in binary format of the Korn shell. I like to "collect" some of my command lines, many of them actually, and for a long time. I'm talking about years. That doesn't seem easy in Korn because the history file is not plain text so I can't edit it, and a lot of junk is piling up in it. By "junk" I mean ...

Making an index-creating class in C++

Hello everyone, I'm busy with programming a class that creates an index out of a text-file ASCII/BINARY. My problem is that I don't really know how to start. I already had some tries but none really worked well for me. I do NOT need to find the address of the file via the MFT. Just loading the file and finding stuff much faster by searc...

C# Sql Compact text query on binary column

I was wondering if anyone knew how to compile a text query for sql compact that goes like this : command.CommandText = "SELECT * FROM tableName WHERE id = binary_Data" The id column is a 32 byte binary column that is indexed and "binary_Data" is the binary data to compare to, but I am not sure how to get a "binary_Data" into the text ...

What's the absolute minimum a programmer should know about binary numbers and arithmetic ?

Although I know the basic concepts of binary representation, I have never really written any code that uses binary arithmetic and operations. I want to know What are the basic concepts any programmer should know about binary numbers and arithmetic ? , and In what "practical" ways can binary operations be used in programming. I have se...

padding binary-block lazy sequences

I have Clojure function that takes a sequence of numbers chops it into the appropriate number of bits and returns a lazy sequence of the chunks (lowest order bits first). It pads the high order bits of the last block to fill out the block size and I need advice on the "best way(tm)" to record the amount of padding while keeping it lazy a...

Reading binary file in Python

In Python, how do I read a binary file and loop over each byte of that file? ...

Java: Syntax and meaning behind "[B@1ef9157"? Binary/Address?

Hey, I'm trying to figure out what the [B@ prefix means in java. They come out when I attempt to print byte arrays. However, byte arrays of size 32 and size 4 are identical in length. Always "[@B1234567". What is this? Also, they have the property of only printing hex values. I know it can't just be a binary print because random ex...

Nginx - Treats PHP as binary

We are running Nginx+FastCgi as the backend for our Drupal site. Everything seems to work like fine, except for this one url. http:///sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/smimage/index.php (We use TinyMCE module in Drupal, and the url above is invoked when user tries to upload an image) When we were using Apache,...

Performing a binary OR in COBOL with Pic X data

I have a number of flags defined (by a header file far outside my control) that look something like this: * * OPTVAL field for IPV6_ADDR_PREFERENCES_FLAGS * 01 IPV6-ADDR-PREFERENCES-FLAGS PIC X(4). * * IPV6_ADDR_PREFERENCES_FLAGS mappings * 77 IPV6-PREFER-SRC-HOME PIC X(4) VALUE X'00000001'. 77 IPV6-PRE...

Format/encoding of this binary data file

I'm attempting to write a program that integrates with Advent Axys, software for financial planners and the like. The product's site is here: http://www.advent.com/solutions/asset-managers-software/axys-platform I need to write new entries into the price files, but much of them are binary. I looked around online and didn't find much, an...

I wanna have an Extension method "Equals" between 2 byte arrays.

Hi! I am doing some byte[] comparisons. I tried == but this is just like the base Equals, which: byte[] a = {1,2,3}; byte[] b = {1,2,3}; bool equals = a == b; //false equals = a.Equals(b); //false I tried to add an extension method, but since the overloaded base class' Equals takes the same arguments, it goes to the base method rath...

Find first null in binary tree with limited memory

I have a binary tree where each node can have a value. I want to find the node in the tree that has value null and is closest to the root. If there are two nodes with the same distance from the root, either will do. I need to minimize the number of read accesses to the binary tree. Assume that working memory is limited to just k node...

How to build twice the same Linux Kernel sources and get the the same checksum

I'm searching if it's possible to build twice the same Linux Kernel (same sources, same environment, same options, same compiler) and get the the same checksum. Anybody knows how to do? ...

byte[] buffer or ref/pointer? in C#

I have a raw buffer with it i need to make 3 others, the head which is always the first 8 bytes, body which is always from byte 8 to ? then foot which is from ? to the end of he file. How do i make a buffer from an already existing buffer so i can fill in body and foot. also how do i create head to use the first 16 bytes. I am assuming ...

cannot ececute binary file

Im running Cygwin on XP, iv got a bash script that i would like to execute a media file but get the error "cannot execute binary file" Is this possible? can cygwin call a media file like a mp3 or wav file thanks Donaldo ...

Is there a repository of different implementations of cryptographic algorithms?

For my master thesis, I am looking into different implementations of cryptographic algorithms. They should differ in the following aspects: Cryptographic Algorithm (AES, DES, RSA, MD5, ...) Algorithm Implementation (OpenSSL, MS, Papers' Reference Implementation, ...) Compiler used (VC, GCC, ...) Also, they should only implement the ...

Trying to read non Java primitives from a binary file

I am trying to read a binary file from a program that writes a log (of sorts) to a dat file which I have worked out reasonably well the format of using Java. I am loading it as so: DataInputStream in = new DataInputStream(new FileInputStream("file.dat")); System.out.println("Bytes skipped: " + in.skipBytes(4)); System.out.println(in.r...

Why Base 2 with binary numbers?

History: I read from one of Knuth's algorithm book that first computers used the base of 10. Then, it switched to two's complement here. Question: Why does the base could not be -2 in at least a monoid? Examples: (-2)^1 = -2 (-2)^3 = -8 ...

Convert a base25 String to binary String in Java

So I have a set of base digits like "BCDFGHJKLMNPQRSTVWXZ34679" how do I convert a value say "D6CN96W6WT" to binary string in Java? ...