Documentation Prolog Predicate Reference builtin put_byte/1


Write byte in current output stream.


put_byte( +byte )

put_byte(Byte) writes the byte Byte to the current output stream.

Note: in JavaScript, characters are represented using 16 bits, so, in broswer, putting a byte (an intenger between 0 and 255, represented using 8 bits) in the output stream will use that 8 bits as the 8 least significant bits of a character. When another put_byte is made, this new 8 bits will be used as the 8 remaining bits (the most significative ones) of said character. In the case of Node.js, the bits used to represent a character will depend on the file encoding.