Skip to content

A memory unit conversion library that makes working with multiple sizes and SI/IEC standards straight forward

License

Notifications You must be signed in to change notification settings

the-forges/bitty

Repository files navigation

Bitty

Build Status Go Report Card codecov

Bitty is a memory unit conversion library that makes working with multiple sizes and SI/IEC standards straight forward. It is based on unit ecapsulation, immutability, plugability, and testability: the idea that each unit should know how to operate with other valid units idempotently; every unit function returns a new unit or value, instead of changing itself; each unit implements interfaces so that it's easy to plug in new unit types (which also makes testing new unit types straight forward).

Features

Standards Compliance

Mathematics

  • Adding different units against each other
  • Subtracting units from each other
  • Multiplying units against each other
  • Dividing units from each other

Conversions

  • Unit conversions
  • Standard conversions

Helpers

  • Unit parsing
  • Finding a specific unit