Skip to main content

Questions tagged [binary]

Filter by
Sorted by
Tagged with
2 votes
2 answers
183 views

I have a dictionary with a lot of symbols, each of which is encoded in a huffman binary string. Example: Symbol Huffman Code you 010 shall 0111 not 00111 pass 00001 ... ... Therefore I encode the ...
Benzio's user avatar
  • 131
9 votes
4 answers
1k views

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 ...
Madagascar's user avatar
  • 10.1k
3 votes
1 answer
148 views

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
333 views

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
629 views

I want to serialize a C++ class Ramdomclass . Below is the serialization function. ...
Sebastian Orteho's user avatar
1 vote
3 answers
255 views

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
  • 319
1 vote
2 answers
630 views

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
  • 941
1 vote
1 answer
3k views

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
2k views

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,588
5 votes
1 answer
714 views

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
614 views

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 Pollard's user avatar
6 votes
1 answer
419 views

edit: here is a cleaned-up version incorporating most (but not all) feedback, thanks guys; https://gist.github.com/divinity76/79efd7b8c0d7849b956cd194659c98e5 edit2, 2021-07-16: found a bug (possible ...
hanshenrik's user avatar
3 votes
1 answer
255 views

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
273 views

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