This library offers a compact data structure for "generalized"1 UTF-8 encoded codepoints. The design is based on an implicit data structure2, which uses @popCount and bit masking to check membership quickly, with minimal branching, and without having to decode the UTF-8 into another format (for instance, a codepoint). This design is original, in the sense that I invented it. There may be prior art, it's remarkably difficult to search for "UTF-8 character sets" and find papers on set data structures, so I can't say with high confidence that it's truly novel; in a sense, it's an obvious extension of the widespread practice of using a pair of u64 bitmasks to detect a set of ASCII values. What I can say is: it's effective. The RuneSet struct is just a slice of u64, offering a few variations on set membership tests, depending on how confident you are that the string it's testing is valid UTF-8, and what you would like the test to do in the event that it isn't.

Features

  • Fast utf8 codepoint sets for Zig
  • Provides tools for working with sets of Unicode codepoints, also known as characters or runes
  • Sets of UTF-8 Characters
  • Documentation available
  • The RuneSet is immutable by design
  • The data structure is very fast

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Runeset

Runeset Web Site

Other Useful Business Software
Skillfully - The future of skills based hiring Icon
Skillfully - The future of skills based hiring

Realistic Workplace Simulations that Show Applicant Skills in Action

Skillfully transforms hiring through AI-powered skill simulations that show you how candidates actually perform before you hire them. Our platform helps companies cut through AI-generated resumes and rehearsed interviews by validating real capabilities in action. Through dynamic job specific simulations and skill-based assessments, companies like Bloomberg and McKinsey have cut screening time by 50% while dramatically improving hire quality.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Runeset!

Additional Project Details

Registered

2024-09-10