APIs

Show:

Constructor

ChunkManager

(
  • options
)

Parameters:

  • options Object
    • chunkSize
    • padding_size
    • [headerSize= 0] optional
    • [signatureLength= 0] optional
    • [sequenceHeaderSize= 8] optional

      size of the sequence header

Methods

_write_signature

() private

compute the signature of the chunk and append it at the end of the data block.

makeBuffer turn a string make of hexadecimal bytes into a buffer

(
  • listOfBytes
)
Buffer

Parameters:

  • listOfBytes Object

Returns:

Buffer:

Example:

var buffer = makeBuffer("BE EF");

write

(
  • buffer
  • length
)

Parameters:

  • buffer Buffer
  • length Number

Events

chunk

Event Payload:

  • chunk Buffer
  • isLast Boolean

    , true if final chunk