ServerJS/Binary/C: Difference between revisions

Fix cases where "bit" should have been "byte"
No edit summary
(Fix cases where "bit" should have been "byte")
Line 76: Line 76:
:Construct an empty blob
:Construct an empty blob
;[new] Blob(number);
;[new] Blob(number);
:Construct a single unit blob, converting the number a bit. If the item is outside that range, not a number, or not an integer (has a decimal point) a TypeError should be thrown.
:Construct a single unit blob, converting the number a byte. If the item is outside that range, not a number, or not an integer (has a decimal point) a TypeError should be thrown.
;[new] Blob(arrayOfNumbers);
;[new] Blob(arrayOfNumbers);
:Construct an blob the same length as the array, converting numbers 0..255 into bits. If any item is outside that range, not a number, or not an integer (has a decimal point) a TypeError should be thrown.
:Construct an blob the same length as the array, converting numbers 0..255 into bytes. If any item is outside that range, not a number, or not an integer (has a decimal point) a TypeError should be thrown.
;[new] Blob(blob);
;[new] Blob(blob);
:Passes the blob through.
:Passes the blob through.
40

edits