#ByteString

TechKeysXTechKeysX
2025-06-09

Encode and Decode Strings in Python :
Encode converts a string to bytes, and decode converts bytes back to a string.

2024-02-17

Optimized the living crap out of Playdate MOD player's loading and resampling last night.

E.g.

Allocating table size in the ctor is snappy
```lua
local bytes = { string.byte(byteString, 1, #byteString) }
```

Locals are faster than var references
```lua
local sinc = _modplayer.constants.sinc
```

You can store a short sorted list in an integer. Yay math!
```lua
-- Make room for new blep
-- Store new blep level, age is always 0
bleps = (bleps << 16) + ((sampleIn - currentLevel) << 8)
```

#lua

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst