JavaScript binary read/write streams