Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ByteBuffer

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ByteBuffer - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

ByteBuffer.as

8

ByteBuffer.js

@@ -30,3 +30,2 @@ /*!

var _list = [];
var _offset = 0;
var _endian = 'B';

@@ -212,2 +211,9 @@

};
/**
* 打包成二进制,在前面加上2个字节表示包长
**/
this.packWithHead = function(){
return this.pack(true);
};

@@ -214,0 +220,0 @@ /**

6

package.json
{
"name": "ByteBuffer",
"description": "pack or unpack a byte array",
"homepage" : "http://play175.github.com/ExBuffer/",
"homepage" : "http://play175.github.com/ByteBuffer/",
"keywords": [

@@ -12,5 +12,5 @@ "Buffer",

"author" : "yoyo <http://yoyo.play175.com>",
"repository" : {"type": "git", "url": "https://github.com/play175/ExBuffer.git"},
"repository" : {"type": "git", "url": "https://github.com/play175/ByteBuffer.git"},
"main": "ByteBuffer.js",
"version" : "0.2.5"
"version" : "0.2.6"
}
nodejs版本的ByteBuffer和C++通信的利器!
推荐结合ExBuffer来实现网络协议:https://github.com/play175/ExBuffer
```javascript

@@ -50,3 +52,3 @@ var ByteBuffer = require('./ByteBuffer');

//在打包的时候在开始位置插入一个short型表示包长(通信层中的包头)
var buffer = sbuf.pack(true);
var buffer = sbuf.packWithHead();

@@ -58,2 +60,2 @@ ```

npm install ByteBuffer -g
```
```

@@ -47,2 +47,2 @@ var ByteBuffer = require('./ByteBuffer');

//在打包的时候在开始位置插入一个short型表示包长(通信层中的包头)
var buffer = sbuf.pack(true);
var buffer = sbuf.packWithHead();
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc