Pack / Unpack methods

Here’s the way it’s done in JavaScript. Maybe someone has an idea of how to replicate it this way in Crystal?

const buf = Buffer.allocUnsafe(4);
buf.writeFloatLE(5, 0);
Uint8Array.from(buf);