%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
# Buffer Alloc A [ponyfill](https://ponyfill.com) for `Buffer.alloc`. Works as Node.js: `v7.0.0` <br> Works on Node.js: `v0.10.0` ## Installation ```sh npm install --save buffer-alloc ``` ## Usage ```js const alloc = require('buffer-alloc') console.log(alloc(4)) //=> <Buffer 00 00 00 00> console.log(alloc(6, 0x41)) //=> <Buffer 41 41 41 41 41 41> console.log(alloc(10, 'linus', 'utf8')) //=> <Buffer 6c 69 6e 75 73 6c 69 6e 75 73> ``` ## API ### alloc(size[, fill[, encoding]]) - `size` <Integer> The desired length of the new `Buffer` - `fill` <String> | <Buffer> | <Integer> A value to pre-fill the new `Buffer` with. **Default:** `0` - `encoding` <String> If `fill` is a string, this is its encoding. **Default:** `'utf8'` Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled. ## See also - [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` - [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill` - [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`