I think there should be a safer way to get from Buffers to bitArrays. Passing through UTF-8 seems perilous. Maybe pass through base64 instead?