Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data TinyByteString = TBS !Word64 !Word64
- toTiny :: ByteString -> TinyByteString
- lengthTBS :: TinyByteString -> Int
- packTBS :: String -> TinyByteString
- unpackTBS :: TinyByteString -> String
Documentation
data TinyByteString Source #
at most 16 bytes
>>>
compare (packTBS "a") (packTBS "b")
LT>>>
compare (packTBS "a") (packTBS "ab")
LT
Instances
toTiny :: ByteString -> TinyByteString Source #
lengthTBS :: TinyByteString -> Int Source #
>>>
lengthTBS (packTBS "")
0>>>
lengthTBS (packTBS $ take 16 ['a'..])
16
packTBS :: String -> TinyByteString Source #
unpackTBS :: TinyByteString -> String Source #