A subclass of Deserializer corresponding to the format written by DefaultSerializer.
class
v8.DefaultDeserializer
class DefaultDeserializer
Reads the underlying wire format version. Likely mostly to be useful to legacy code reading old wire format versions. May not be called before
.readHeader().Read a JS
numbervalue. For use inside of a customdeserializer._readHostObject().Reads and validates a header (including the format version). May, for example, reject an invalid or unsupported wire format. In that case, an
Erroris thrown.- length: number
Read raw bytes from the deserializer's internal buffer. The
lengthparameter must correspond to the length of the buffer that was passed toserializer.writeRawBytes(). For use inside of a customdeserializer._readHostObject(). Read a raw 32-bit unsigned integer and return it. For use inside of a custom
deserializer._readHostObject().Read a raw 64-bit unsigned integer and return it as an array
[hi, lo]with two 32-bit unsigned integer entries. For use inside of a customdeserializer._readHostObject().Deserializes a JavaScript value from the buffer and returns it.
- id: number,): void;
Marks an
ArrayBufferas having its contents transferred out of band. Pass the correspondingArrayBufferin the serializing context toserializer.transferArrayBuffer()(or return theidfromserializer._getSharedArrayBufferId()in the case ofSharedArrayBuffers).@param idA 32-bit unsigned integer.
@param arrayBufferAn
ArrayBufferinstance.