Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [encode]

For challenges relating to the encoding and decoding of data.

6
votes
11answers
388 views

Mis-decode a date

Background Inspired by a now deleted question by John Burger from which I quote: Now obviously no human made this mistake. It's a mis-decode of something - perhaps the ISBN? My question is: ...
23
votes
23answers
3k views

Encode - Shuffle - Decode

Challenge Your task is to encode an integer as a string of ASCII characters, then successfully decode it after said string has been randomly shuffled. You will write two programs/functions, which ...
6
votes
1answer
108 views

Bijection: tree-like lists - natural numbers [duplicate]

We define a tree-like list, or trist for short, as the empty list or a list containing only previously constructed trists. The natural numbers can either include 0 or not, according to your ...
38
votes
7answers
7k views

Professor at MIT can read minds!

The task is taken from an MIT lecture by Prof. Devadas called You can read minds. A detailed explanation of the trick can be found in the linked video, or in this document. I'll try to explain it in ...
15
votes
10answers
1k views

Prime Factor Encoding

How the encoding works Given a list of bits: Hold a prime (starting with 2) Have a list For each bit in the input If it's the same as the previous bit, add the ...
11
votes
11answers
1k views

Balanced Zero-One Encoding

Task Encode a string that entirely consists of uppercase alphabets (A-Z) using only zeros and ones, using your own favorite scheme. But the rule isn't that simple! ...
10
votes
1answer
436 views

Braincopterify an image

Introduction Braincopter is an esoteric Brainf*** derivative that encodes a Brainf*** program as an image. As a 2D language, it uses two additional commands; they rotate the instruction pointer (...
9
votes
1answer
267 views

Double run-length encoding

Everyone knows what run-length encoding is. It has been the subject of many code-golf challenges already. We'll be looking at a certain variation. Example ...
7
votes
2answers
571 views

Implement an encoder for RFC 1924 IPv6 Addresses

Introduction Everyone should know IPv6 by now. IPv6 has very long, cumbersome addresses. In 1996 some very intelligent people created a scheme to encode them much better in RFC 1924. For reasons I ...
14
votes
7answers
712 views

Code the Huffman!

Or else he will huff and puff and blow your house down! That was completely irrelevant. This challenge is actually about Huffman coding. The gist of it is the frequency of characters in a given text ...
31
votes
12answers
2k views

Have you learned your fib-abc?

I don't like numbers, but I do like the Fibonacci sequence. I'm sure we could work something out. Please read one integer n from STDIN and output the nth Fibonacci number in base 26 (...
3
votes
0answers
169 views

Dynamic Encoding: A CIA Mission [closed]

The Challenge Mission You are Jim, a CIA agent in charge of super secret spies around the world. However, your enemies, the Naissurs, are highly trained in computer intelligence, and they can hack ...
14
votes
4answers
498 views

Implement bzip2's run-length encoding

Background After applying the BWT (as seen in Burrows, Wheeler and Back) and the MTF (as seen in Move to the printable ASCII front), the bzip2 compressor applies a rather unique form of run-length ...
19
votes
7answers
733 views

Move to the printable ASCII front

Background The move-to-front transform (MTF) is a data encoding algorithm designed to improve the performance of entropy encoding techniques. In the bzip2 compression algorithm, it is applied after ...
20
votes
7answers
3k views

Confuse the Dakotas [closed]

You have been hired by the government of North Dakota to encrypt the state's communications. Write two programs, one to encrypt a message and one to decrypt that message. The government is not really ...
11
votes
4answers
1k views

Encode a string for aliens that read and write English, but don't know ASCII

Turns out there are some distant aliens who know English (and have coincidentally standardized on 8-bit computer architectures). Yet they have never heard of ASCII, nor even alphabetical order. It ...
9
votes
10answers
2k views

Convert a bytes array to base64

Your mission is to write a function/program that converts an array of bytes (i.e: an array of integers from 0 to 255), to base64. Using built-in base64 encoders is not allowed. The required base64 ...