← Back to context

Comment by eslaught

1 year ago

I think the byteyarn library mentioned elsewhere in this thread meets your requirements:

https://mcyoung.xyz/2023/08/09/yarns/

This is perfect, thanks!

... well except it stores up to 15 bytes inline rather than using the UTF-8 trick to cram an extra byte. (But maybe it can't; or at least, ByteYarn really can only store 15 bytes, even though Yarn could store 16 bytes maybe, but this would pose problems when converting between those types because I suppose this conversion is zero cost)