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

@hazae41/binary

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hazae41/binary - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

dist/cjs/libs/buffers/buffers.cjs

29

dist/types/mods/binary/binary.d.ts

@@ -1,10 +0,11 @@

declare class Binary {
buffer: Buffer;
declare class Binary<T extends Uint8Array> {
bytes: T;
offset: number;
readonly view: DataView;
readonly data: DataView;
/**
* An object with a Buffer and an offset
* @param buffer Buffer
* @param bytes Buffer
*/
constructor(buffer: Buffer);
constructor(bytes: T);
get buffer(): Buffer;
/**

@@ -15,3 +16,3 @@ * Create a new Binary using Buffer.alloc

*/
static alloc(length: number): Binary;
static alloc(length: number): Binary<Buffer>;
/**

@@ -22,3 +23,3 @@ * Create a new Binary using Buffer.allocUnsafe

*/
static allocUnsafe(length: number): Binary;
static allocUnsafe(length: number): Binary<Buffer>;
/**

@@ -32,3 +33,3 @@ * @returns number of remaining bytes

*/
get before(): Buffer;
get before(): Uint8Array;
/**

@@ -38,3 +39,3 @@ * Get a slice of the buffer after the current offset

*/
get after(): Buffer;
get after(): Uint8Array;
/**

@@ -45,3 +46,3 @@ * Get a slice of the buffer

*/
get(length: number): Buffer;
get(length: number): Uint8Array;
/**

@@ -53,3 +54,3 @@ * Read a slice of the buffer

*/
read(length: number): Buffer;
read(length: number): Uint8Array;
/**

@@ -199,3 +200,3 @@ * Set an array to the buffer

*/
getNulled(): Buffer;
getNulled(): Uint8Array;
/**

@@ -205,3 +206,3 @@ * Read a NULL-terminated slice

*/
readNulled(): Buffer;
readNulled(): Uint8Array;
/**

@@ -246,3 +247,3 @@ * Set a NULL-terminated array

*/
reread(offset: number): Buffer;
reread(offset: number): Uint8Array;
/**

@@ -249,0 +250,0 @@ * @deprecated

{
"type": "module",
"name": "@hazae41/binary",
"version": "1.0.9",
"version": "1.1.0",
"description": "Zero-copy Buffer reader and writer",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/hazae41/binary",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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