MCPcopy Create free account
hub / github.com/Lazack28/Lazack-Device / createBasicChunk

Function createBasicChunk

lib/webp.js:111–124  ·  view source on GitHub ↗
(name, data)

Source from the content-addressed store, hash-verified

109}
110
111function createBasicChunk(name, data) {
112 let chunk = Buffer.alloc(8),
113 size = data.length,
114 out;
115 chunk.write(name, 0);
116 chunk.writeUInt32LE(size, 4);
117 out = [chunk, data];
118
119 if (size & 1) {
120 out[2] = nullByte;
121 }
122
123 return out;
124}
125
126var _convertToExtended = new WeakSet();
127

Callers 2

muxAnimMethod · 0.85
webp.jsFile · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected