Overview of mus encoding packages
mainThe mus library is modular. You choose a package based on your performance and data requirements:
| Package | Use Case | Key Strength | Trade-off |
|---|---|---|---|
varint | Numbers | Space efficient | Slight CPU cost |
raw | Numbers, Time | Fast encoding | Higher space usage for small numbers |
ord (ordinary) | Pointers, Strings, Slices, Maps | Variable-length types support | Standard allocations |
unsafe | High-perf Numbers, Time, Strings, Arrays | Zero-allocation | Uses unsafe type conversions |
pm (pointer mapping) | Pointers, Cyclic Graphs, Linked Lists | Preserves pointer equality | Slightly more complex than ord |
typed | Interface/Versioning | Typed serialization | Requires DTM definition |