MCPcopy Create free account
hub / github.com/diegomura/react-pdf / initDeflate

Method initDeflate

packages/pdfkit/src/reference.js:24–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 }
23
24 initDeflate() {
25 this.data.Filter = 'FlateDecode';
26
27 this.deflate = zlib.createDeflate();
28 this.deflate.on('data', chunk => {
29 this.chunks.push(chunk);
30 return (this.data.Length += chunk.length);
31 });
32
33 return this.deflate.on('end', this.finalize);
34 }
35
36 _write(chunk, encoding, callback) {
37 if (!Buffer.isBuffer(chunk)) {

Callers 1

_writeMethod · 0.95

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected