A pkt-line codec packaged as a min-stream push-filter.
A pkt-line codec packaged as maps and min-stream push-filters.
This is a component of the js-git project.
This module exports 4 functions. There are two maps and two push-filters.
var pktLine = require'min-stream-pkt-line';// Assuming source, app, and sink already exist, here is one way to insert the// framing and deframing into the stream.helpersrunsourcepktLinedeframerapppktLineframersink;
The map functions are used directly as needed and not applied to the stream as a whole.
A map function that encodes the data portion of pkt-lines
A map function that decodes the data portion of pkt-lines.
A push-filter that consumes arbitrary sized buffers and outputs deframed message buffers.
The flush message is encoded as
If the stream transitions to raw PACK mode, a
true event is emitted to signify the transition.
A map function that accepts a buffer and returns a framed buffer.
null to encode a flush frame.
true to set the mode to raw PACK mode.