open-index/open-npm huggingface dataset:
npm package: @qsocket/protocol
Description: QSocket Protocol: A versatile protocol for transmitting messages of any type in buffer format, designed exclusively for the QSocket ecosystem. Enables efficient, high-speed data transfer between processes and across client-server connections.
Author: Pobedinskiy David
Latest version: 0.0.1-rc3

# @qsocket/protocol

![npm version](https://img.shields.io/npm/v/@qsocket/protocol) ![npm downloads](https://img.shields.io/npm/dm/@qsocket/protocol) ![GitHub license](https://img.shields.io/github/license/qsocket-js/protocol)

**@qsocket/protocol** is a robust protocol for data transmission within the [QSocket](https://www.npmjs.com/package/@qsocket) library, enabling efficient interprocess communication with support for various data types and encoding/decoding formats. This package is specifically tailored for QSocket and provides essential classes and types for handling any message content in buffer format.

## Key Features

- **Message Types**: Supports various message types for data transmission, connection management, and delivery acknowledgment.
- **Content Types**: Supports multiple content formats, including JSON, Buffer, strings, and other data types.
- **Performance Optimized**: The protocol is designed for low latency and efficient data transfer in buffer format.

## Installation

To install the `@qsocket/protocol` package, run the command:

```bash
npm install @qsocket/protocol
```

> Note: For full functionality, it is recommended to use this package within the `@qsocket/core` framework.

## Usage Example

An example of how to use `@qsocket/protocol` to define message types and content types in a Node.js application based on QSocket:

```typescript
import { QSocketProtocol, EQSocketProtocolMessageType, EQSocketProtocolContentType, IQSocketProtocolChunk } from '@qsocket/protocol';

// Initialize QSocketProtocol
const protocol = new QSocketProtocol();

// Create a simple message
const messageChunk: IQSocketProtocolChunk = {
	meta: {
		type: EQSocketProtocolMessageType.DATA,
		uuid: 'example-uuid',
		namespace: 'example-namespace',
		event: 'example-event',
	},
	payload: {
		data: Buffer.from('Hello, QSocket!'),
		'Content-Type': EQSocketProtocolContentType.BUFFER,
	},
};

function processMessage() {
	// Encode the message
	const encodedMessage = protocol.to([messageChunk]);
	if (encodedMessage instanceof Error) throw encodedMessage;

	// Decode the message
	const decodedMessage = protocol.from(encodedMessage);
	if (decodedMessage instanceof Error) throw decodedMessage;

	console.log('Original message:', messageChunk);
	console.log('Decoded message:', decodedMessage);
}

// Call the function
processMessage().catch(console.error);
```

## License

This project is licensed under the MIT License.
npm package: @qsocket/transport-engine.io-client-latest
Description: A wrapper for the latest engine.io-client version, designed for @qsocket/core, offering updated client transport support for qsocket applications.
Author: Pobedinskiy David
Latest version: 0.0.1-rc

# @qsocket/transport-engine.io-client-latest

![npm version](https://img.shields.io/npm/v/@qsocket/transport-engine.io-client-latest)
![npm downloads](https://img.shields.io/npm/dm/@qsocket/transport-engine.io-client-latest)
![GitHub license](https://img.shields.io/github/license/qsocket/qsocket)

**@qsocket/transport-engine.io-client-latest** is a client wrapper package for the latest version of [engine.io-client](https://github.com/socketio/engine.io-client). This package provides compatibility with the latest updates of **[@qsocket/core](https://www.npmjs.com/package/@qsocket/core)**, ensuring smooth integration with the newest `engine.io-client` features.

To use all transports in one installation, consider **[@qsocket/transport](https://www.npmjs.com/package/@qsocket/transport)**, a collection of all official qsocket transports.

> For a complete package with the core and all supported transports, check out **[@qsocket/framework](https://www.npmjs.com/package/@qsocket/framework)**.

### Installation

To install this package, run:

```bash
npm install @qsocket/transport-engine.io-client-latest
```
npm package: @qsocket/transport-engine.io-client-v3
Description: A wrapper for engine.io-client v3, designed for @qsocket/core, enabling client-side connections with legacy Engine.IO in qsocket applications.
Author: Pobedinskiy David
Latest version: 0.0.1-rc

# @qsocket/transport-engine.io-client-v3

![npm version](https://img.shields.io/npm/v/@qsocket/transport-engine.io-client-v3)
![npm downloads](https://img.shields.io/npm/dm/@qsocket/transport-engine.io-client-v3)
![GitHub license](https://img.shields.io/github/license/qsocket/qsocket)

**@qsocket/transport-engine.io-client-v3** is a client wrapper package for [engine.io-client](https://github.com/socketio/engine.io-client), specifically version **3**. Designed for compatibility with **[@qsocket/core](https://www.npmjs.com/package/@qsocket/core)**, this package allows `engine.io-client@3.6.2` to work alongside other versions within the same project.

To streamline setup, all transports, including this one, are available in the unified **[@qsocket/transport](https://www.npmjs.com/package/@qsocket/transport)** package.

> If you prefer a single package that includes the core and all transports, use **[@qsocket/framework](https://www.npmjs.com/package/@qsocket/framework)**.

### Installation

To install this package, run:

```bash
npm install @qsocket/transport-engine.io-client-v3
```
npm package: @qsocket/transport-engine.io-latest
Description: A wrapper for the latest engine.io version, fully compatible with @qsocket/core, providing up-to-date server transport capabilities for qsocket projects.
Author: Pobedinskiy David
Latest version: 0.0.1-rc2

# @qsocket/transport-engine.io-latest

![npm version](https://img.shields.io/npm/v/@qsocket/transport-engine.io-latest)
![npm downloads](https://img.shields.io/npm/dm/@qsocket/transport-engine.io-latest)
![GitHub license](https://img.shields.io/github/license/qsocket/qsocket)

**@qsocket/transport-engine.io-latest** is a wrapper package for the latest version of [engine.io](https://github.com/socketio/engine.io). This package is continuously updated to offer the newest features for **[@qsocket/core](https://www.npmjs.com/package/@qsocket/core)** users, ensuring seamless compatibility with the most recent `engine.io` version.

To simplify your setup, **[@qsocket/transport](https://www.npmjs.com/package/@qsocket/transport)** gathers all official transport packages in a single bundle.

> For a unified experience with both the core and all transports, use **[@qsocket/framework](https://www.npmjs.com/package/@qsocket/framework)**.

## Installation

To install this package, run:

```bash
npm install @qsocket/transport-engine.io-latest
```
npm package: @qsocket/transport-engine.io-v3
Description: A wrapper for engine.io v3, compatible with @qsocket/core, allowing integration with legacy versions of Engine.IO in qsocket projects.
Author: Pobedinskiy David
Latest version: 0.0.1-rc

# @qsocket/transport-engine.io-v3

![npm version](https://img.shields.io/npm/v/@qsocket/transport-engine.io-v3)
![npm downloads](https://img.shields.io/npm/dm/@qsocket/transport-engine.io-v3)
![GitHub license](https://img.shields.io/github/license/qsocket/qsocket)

**@qsocket/transport-engine.io-v3** is a wrapper package for the [engine.io](https://github.com/socketio/engine.io) library, specifically version **3**. This package is designed for projects that require `engine.io@3.6.2` for compatibility with the **qsocket** library, allowing `engine.io@3.6.2` to coexist with other versions in the same project.

This package can be used independently with **[@qsocket/core](https://www.npmjs.com/package/@qsocket/core)**, the main library core. To simplify installation, all transports are gathered in **[@qsocket/transport](https://www.npmjs.com/package/@qsocket/transport)**, which includes all officially supported transport packages.

> For a comprehensive package that bundles the core and all transports, consider using **[@qsocket/framework](https://www.npmjs.com/package/@qsocket/framework)**.

### Installation

To install this package, run:

```bash
npm install @qsocket/transport-engine.io-v3
```
npm package: @qsp/cli
Description: CLI tools for QSP
Author: Sergii Kostyrko
Latest version: 1.0.5

# QSP cli

CLI tools QSP platform [https://qsp.org/](https://qsp.org/)


## Installation

```bash
npm install -g @qsp/cli
```

## Usage

For now CLI has only 1 commad avaliable for converting binary QSP files into text format and vice versa. It determines current format based on file extension. `.qsp` and `.gam` files are considered binary format, and `.qsps`, `.qsp-txt` and `.txt-qsp` as text format. For output `.qsp` is used for binary format and `.qsps` for text.

This will convert binary file and save it as `1.qsps` in same directory.
```sh
qsp-cli 1.qsp
```

This will convert text file and save it as `1.qsp` in same directory.
```sh
qsp-cli 1.qsps
```

You can pass several files in one call (even mixing binary and text).
```sh
qsp-cli 1.qsps 2.qsp
```

Globs are also supported
```sh
# converting all .qsp files in current directory
qsp-cli *.qsps 

# converting all .qsp files in current directory and all its nested directories
qsp-cli **/*.qsps 
```

Output directory can be changed with `--directory` argument. Directory structure is preserved in this case.
```sh
# saves output into dist/src/1.qsp
qsp-cli --directory=dist src/1.qsps 
```

Text format is save using utf-8 encoding by default. This is not compatible with older tool `txt2gam` that works with utf16le encoding. To change output encoding use `--unicode` argument.
```sh
qsp-cli --unicode 1.qsp 
```


## Licensing

The code in this project is licensed under MIT license.
npm package: @qsp/converters
Description: Converters of different file formats for QSP platform
Author: Sergii Kostyrko
Latest version: 1.0.1

# QSP file format converters

Converters of different file formats for QSP platform [http://qsp.org/](http://qsp.org/)
## Installation

```bash
npm install --save @qsp/converters
```

## Usage

This library has separate functions for reading and writing file formats. QSP primary format is binary, but there exists also commonly agreed text format. Library references these 2 formats as `qsp` for binary and `qsps` for text format. File reading/writing was deliberately not made a part of library so it can easily be used in any environment (browser or Node.js) that supports ArrayBuffer and typed arrays. 
Text format is expecting `utf8` encoded string so if you have string in different encoding you need to convert it before using library.

### Reading

```typescript
function readQsp(buffer: ArrayBuffer): QspLocation[];
function readQsps(content: string): QspLocation[];
```

### Writing 

```typescript
function function writeQsp(locations: QspLocation[]): ArrayBuffer;
function function writeQsps(locations: QspLocation[], linebreak?: string): string;
```

`writeQsps` uses `\n` as line-break by default but this can be configured using second argument.

## Licensing

The code in this project is licensed under MIT license.