
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Byte buffer specialized for data in chunks with special cases for dropping bytes in the front, merging bytes in to various integer types and abandoning buffer without penalty for previous chunk merges.
The `obuf` npm package is designed for efficient binary data manipulation. It allows for operations such as appending, slicing, and transforming binary data in a buffer. This package is particularly useful for applications that require direct manipulation of binary data, such as networking applications, file I/O operations, and data serialization/deserialization tasks.
Appending data
This feature demonstrates how to append data to the buffer. It includes appending both a UInt8 and a string to the buffer.
"use strict";\nconst OBuffer = require('obuf');\nlet buffer = new OBuffer();\nbuffer.writeUInt8(0x01);\nbuffer.writeString('Hello, World!');"
Slicing data
This feature shows how to slice a portion of the buffer. It creates a slice of the buffer from index 0 to 5.
"use strict";\nconst OBuffer = require('obuf');\nlet buffer = new OBuffer();\nbuffer.writeUInt8(0x01);\nbuffer.writeString('Hello, World!');\nlet slice = buffer.slice(0, 5);"
Transforming data
This feature illustrates how to transform the data in the buffer. It applies a transformation function to each byte in the buffer, in this case, XORing each byte with 0xff.
"use strict";\nconst OBuffer = require('obuf');\nlet buffer = new OBuffer();\nbuffer.writeUInt8(0x01);\nbuffer.transform(data => {\n // Transform the data\n return data.map(byte => byte ^ 0xff);\n});"
The `buffer` package is a built-in Node.js module that provides a way to work with binary data. It is similar to `obuf` in that it allows manipulation of binary data. However, `obuf` might offer a more fluent API for chaining operations.
The `bl` (Buffer List) package is a storage object for collections of Node Buffers, similar to `obuf` in its focus on binary data. Unlike `obuf`, `bl` is optimized for scenarios where you need to collect data chunks into a single buffer and consume it sequentially.
Byte buffer specialized for data in chunks with special cases for dropping bytes in the front, merging bytes in to various integer types and abandoning buffer without penalty for previous chunk merges.
Used in spyd-transport, part of spdy support for http2.
This software is licensed under the MIT License.
By Fedor Indutny, 2015.
FAQs
Byte buffer specialized for data in chunks with special cases for dropping bytes in the front, merging bytes in to various integer types and abandoning buffer without penalty for previous chunk merges.
The npm package obuf receives a total of 13,467,466 weekly downloads. As such, obuf popularity was classified as popular.
We found that obuf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.