composewell / streamly

High performance, concurrent functional programming abstractions
https://streamly.composewell.com
Other
865 stars 66 forks source link

Generalize the Utf8 array functions to general arrays #1420

Open harendra-kumar opened 2 years ago

harendra-kumar commented 2 years ago

In general we can have functions that take encode/decode as arguments. These can then be reused to implement Utf8/Utf16/Utf32 text types. If we supply compress/decompress in these APIs that will allow us to do operations on compressed buffers in memory.

harendra-kumar commented 2 years ago

If we have a type class with toStream/fromStream operations then we can write general functions that operate on any type supporting this type class.