Problem I wrote something to “compress” svg files. The svg files I am using often have comments and empty <g> […]
Tag: compression
Huffman Coding in Swift
Problem I’m learning Swift and decided the Huffman Coding algorithm would be a good exercise while learning this new language. […]
Run-length decoder
Problem This replaces numbers with the character that appears next to them (‘number’ times). Is there a a more elegant […]
Huffman code generator in Haskell
Problem This is problem 50 in https://wiki.haskell.org/99_questions/46_to_50. The website has more elegant Haskell solutions, but I wanted to get feedback […]
RFC 1951 compression LZ77 re-hashing approach
Problem I have written a C# class to perform LZ77 compression ( per RFC 1951 ), to incorporate in my […]
String compression implementation in C#
Problem I wrote a method that reduces a string like aabcccccaaa to a2b1c5a3 My implementation: string Compress(string str) { StringBuilder […]
Run-length encoding in Haskell
Problem I wrote a short Haskell script to compress and decompress via the use of run length encoding. The concept […]
Compress an ASCII string
Problem Given an ASCII string create a ‘compressed’ version of it. For example, aabccccddddddde would output a2bc4d7e whereas abc would […]
Huffman code generator in Typescript
Problem Write a program that takes any input text and produces both a frequency table and the corresponding Huffman code. Take […]
Transforming an array in Ruby
Problem I watched a presentation by Dave Thomas on Elixir where he gave an example problem that he solved using […]