wordle-trie-packing

Wordle clones are everywhere, but who is thinking about the bandwidth? (by adamcw)

Wordle-trie-packing Alternatives

Similar projects and alternatives to wordle-trie-packing

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better wordle-trie-packing alternative or higher similarity.

wordle-trie-packing reviews and mentions

Posts with mentions or reviews of wordle-trie-packing. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-02-19.
  • Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
    12 projects | news.ycombinator.com | 19 Feb 2022
    = ~20,560 bytes

    I assumed I didn't need any bits for indicating end of word, because all Wordle words are length 5.

    Meanwhile, bitpacked trie can get down to 15,599 bytes.

    https://github.com/adamcw/wordle-trie-packing#all-words

    It's not clear to me a path that will compress the DAWG so much that it could cut another 5000 bytes and whatever the Huffman table size is.

    12 projects | news.ycombinator.com | 19 Feb 2022
    A trie will already run-length encode all the first letters into 26*5=130 bits pre-Huffman coding. I doubt RLE will beat that. A trie will in essence RLE every level but without needing to track the length of the run, so I suspect it'll outperform RLE at every level.

    If you have a means of doing RLE that performs otherwise, I'd love to understand how it works.

    FYI, turning it into 12972 by 5 and Brotli compressing achieves 15,093 bytes, which is less than if you first turn the data into an ASCII trie then Brotli compress that (14,180 bytes) (Source: https://github.com/adamcw/wordle-trie-packing#all-words).

    12 projects | news.ycombinator.com | 19 Feb 2022
    I think you might have miscalculated bits per bytes here?

    8 * 17,763/64,860 = 2.19

    Also, I attempted to implement this as described in this paper (variable length encoding the letters and the offsets, utilized L, and dropped F entirely because all words are the same length, N didn't make a big difference).

    I achieved a naive size of 20,560 bytes, which I didn't have confidence implementing more advanced techniques outlined in the paper would get the size down sufficiently to compete with using a trie+Huffman representation (15,599 bytes, https://github.com/adamcw/wordle-trie-packing#all-words).

    8 * 15,599/64,860 = 1.92 bits per byte.

    12 projects | news.ycombinator.com | 19 Feb 2022
    ```

    Doing this, and then doing the variable length encoding I got the file down to 13,181 bytes (it was 13,180 bytes, but I needed to add a 7 bit termination string so that you can properly decode the file after you write it to disk, otherwise when the file rounds to the nearest byte you have random 0s that get decoded).

    I'm sure with some twiddling of the alphabets some more you could save a few more bytes, but this does better than both Brotli on a ASCII trie and the Huffman Trie by almost 1KB (https://github.com/adamcw/wordle-trie-packing#all-words), so I'm very happy.

    12 projects | news.ycombinator.com | 19 Feb 2022
    You can get down to 15,559 bytes by combining a trie with Huffman coding: https://github.com/adamcw/wordle-trie-packing

    However, this doesn't beat general Brotli encoding of a ASCII trie representation, which gets down to 14,180 bytes (but needs an experience decoder), but goes to show general purpose compression is still really really good these days.

  • A note from our sponsor - WorkOS
    workos.com | 29 Mar 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic wordle-trie-packing repo stats
5
2
4.7
about 2 years ago

adamcw/wordle-trie-packing is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of wordle-trie-packing is Python.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com