From befadfb701e822468645e5b5bcb0f130f4937404 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 10 Jul 2025 14:44:33 -0400 Subject: Add text compression optimizations for unicode text --- src/stdlib/datatypes.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/stdlib/datatypes.h') 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; -- cgit v1.2.3