diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-07-10 14:44:33 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-07-10 14:46:42 -0400 |
| commit | befadfb701e822468645e5b5bcb0f130f4937404 (patch) | |
| tree | d8b148e93fc5b1b206bd056e6e74211daec98cca /src/stdlib/datatypes.h | |
| parent | ba7161d6a3156a966c21ea3e06168bdac9803819 (diff) | |
Add text compression optimizations for unicode text
Diffstat (limited to 'src/stdlib/datatypes.h')
| -rw-r--r-- | src/stdlib/datatypes.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stdlib/datatypes.h b/src/stdlib/datatypes.h index 135fb811..fce1ea74 100644 --- a/src/stdlib/datatypes.h +++ b/src/stdlib/datatypes.h @@ -74,7 +74,7 @@ typedef struct { void *fn, *userdata; } Closure_t; -enum text_type { TEXT_ASCII, TEXT_GRAPHEMES, TEXT_CONCAT }; +enum text_type { TEXT_ASCII, TEXT_GRAPHEMES, TEXT_CONCAT, TEXT_BLOB }; typedef struct Text_s { int64_t length:54; // Number of grapheme clusters @@ -92,6 +92,10 @@ typedef struct Text_s { struct { const struct Text_s *left, *right; }; + struct { + const int32_t *map; + const uint8_t *bytes; + } blob; }; } Text_t; |
