MCPcopy Create free account
hub / github.com/porsager/postgres / fit

Function fit

cf/src/bytes.js:66–74  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

64export default b
65
66function fit(x) {
67 if (buffer.length - b.i < x) {
68 const prev = buffer
69 , length = prev.length
70
71 buffer = Buffer.allocUnsafe(length + (length >> 1) + x)
72 prev.copy(buffer)
73 }
74}
75
76function reset() {
77 b.i = 0

Callers 4

strFunction · 0.70
i16Function · 0.70
i32Function · 0.70
zFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected