iwoplaza / typed-binary

Describe binary structures with full TypeScript support. Encode and decode into pure JavaScript objects.
https://iwoplaza.github.io/typed-binary/
MIT License
106 stars 3 forks source link

Add Float16Schema #37

Closed reczkok closed 4 weeks ago

reczkok commented 1 month ago

This PR adds support for Float16 schema. Since the support for DataView float16 functions and Float16Array is very limited it does not rely on them. Instead, it provides two functions numberToFloat16 and float16ToNumber that are simple conversion functions based on the IEEE 754 format (essentially binary64 -> binary16).

What it does:

What it lacks: