psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.07k stars 54 forks source link

Use an array for the wordlist #90

Closed Jacalz closed 1 year ago

Jacalz commented 1 year ago

The map was not necessary as all possible byte combinations 0-255 were filled up. Using an array works just as well with some added bonuses for code size and memory usage.

This is not breaking the API as all 0-255 byte combinations already are filled up. Any user code that was modifying individual entries or iterating through the map will still compile and work correctly.

psanford commented 1 year ago

This is a type change of a public variable which is a breaking change.