Handy helper functions for working with byte arrays in JavaScript.