Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [binary]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9 votes
4 answers

Reverse Engineering Data Files (Binary Visualization)

Binary Visualization based on Christopher Domas talk: youtube link and this Russian programmer where I discovered this talk: youtube link. Algorithm: Scan the pairs of bytes of a file with a sliding ...
Harith's user avatar
  • 7,012
2 votes
1 answer

Any amount bits integer

This class is meant to work exactly as an unsigned integer should work, but it limits the value based on a set amount of bits. ...
RhinoRunner's user avatar
5 votes
1 answer

Most compact data format for a shopping cart

I'm trying to build a format that can represent the user's cart on my website in the most compact way. The website is related to computer parts and there are 23 product categories. Each product has an ...
Raees Iqbal's user avatar
-2 votes
1 answer

How can I optimize C++ serialization? [closed]

I want to serialize a C++ class Ramdomclass . Below is the serialization function. ...
Sebastian Orteho's user avatar
0 votes
3 answers

Convert from decimal to binary and octal

I wrote a program that implements an algorithm that converts from decimal to binary and octal Please criticize my implementation. What else can I do to improve? ...
Mike's user avatar
  • 299
1 vote
2 answers

Reading 12-bit words from 32-bit stream

I have a device (ADC) that stores its samples in a 32-bit buffer and each sample is a 12-bit word : I needed an algorithm to read those samples to a container (say ...
LRDPRDX's user avatar
  • 831
4 votes
2 answers

Algorithm to find the sequence of bits that makes up to a given number

Edenia's user avatar
  • 1,568
1 vote
1 answer

Float to binary conversion

I wrote a program to convert float to it's binary IEEE754 representation in C. Any improvements to this is appreciated ...
C--'s user avatar
  • 113
6 votes
4 answers

Bytes to binary conversion function

I created a quick function to convert n bytes into binary for my student. She is not on that level yet, but I think it would be best for her if my demonstrative ...
Edenia's user avatar
  • 1,568
5 votes
1 answer

Binary IO inspired by struct pack

About I'm writing a header-only template library for helping with binary IO. It is inspired by pack-d, which is in turn inspired by Python's struct module. I've only finished the output part and ...
Luka Aleksić's user avatar
3 votes
2 answers

How to simplify and optimize bitwise get/set operations on a large bit buffer in JavaScript?

tl;dr: How could you rewrite the buf_get and buf_set functions below to be most optimal? It took me a long time and a lot of ...
Lance's user avatar
  • 351
6 votes
1 answer

binary data shell echo generator

edit: here is a cleaned-up version incorporating most (but not all) feedback, thanks guys; edit2, 2021-07-16: found a bug (possible ...
hanshenrik's user avatar
3 votes
1 answer

Swapping Nibbles

I have small (<250 bytes) chunk of binary data, where I know that almost always, the first nibble is going to be zero 0. For example, in hex: ...
Brad's user avatar
  • 215
1 vote
1 answer

Serializing object graph to proprietary binary file

I'm creating a class library to read/write .3di files which are binary files describing 3D models for a video game. This review is for the write/serialization process. I've mapped the different ...
Tyler Daniels's user avatar