Package0.1.6Data
text-short
Memory-efficient representation of Unicode text strings
- Version0.1.6
- CategoryData
- LicenceBSD-3-Clause
- AuthorHerbert Valerio Riedel
- Maintainerhvr@gnu.org
- Pinned byhackage text-short 0.1.6
- Sourcehackage.haskell.org/package/text-short-0.1.6
Modules
3 modules- Data.Text.Short58Memory-efficient representation of Unicode text strings. This module is intended to be imported qualified, to avoid name
- Data.Text.Short.Partial8Partial functions vocabulary This module provides common partial functions for operating on ShortText. The use of these functions is disc…
- Data.Text.Short.Unsafe2Unsafe API This module provides unsafe conversion functions
Description
This package provides the ShortText type which is suitable for keeping many short strings in memory. This is similiar to how ShortByteString relates to ByteString.
The main difference between Text and ShortText is that ShortText doesn't support zero-copy slicing (thereby saving 2 words), and, compared to text-1.*, that it uses UTF-8 instead of UTF-16 internally. Consequently, the memory footprint of a (boxed) ShortText value is 4 words (2 words when unboxed) plus the length of the UTF-8 encoded payload.
Depends on
8 packages- base-4.20.2.0with GHC
- binary-0.8.9.3with GHC
- bytestring-0.12.2.0with GHC
- deepseq-1.5.0.0with GHC
- ghc-prim-0.12.0with GHC
- hashable-1.4.7.0in this set
- template-haskell-2.22.0.0with GHC
- text-2.1.3with GHC