4.3.0 • Published 4 years ago

ice-dump v4.3.0

Weekly downloads
101
License
GPL-2.0
Repository
github
Last release
4 years ago

Ice Dump npm version Build Status

Encode and decode ZeroC Ice values manually into Ice binary format.

Installation

npm install ice-dump

Usage

Serializing instances of Ice.Value:

import {valueToBuffer, bufferToValue} from 'ice-dump';

const buffer = valueToBuffer(iceValue); // Uint8Array

const readValue = bufferToValue(buffer);

Using Sliced format:

import {Ice} from 'ice';

const buffer = valueToBuffer(iceValue, Ice.FormatType.SlicedFormat);

If you need to deal with proxies, pass Communicator as a second parameter to bufferToValue.

To serialize structs, sequences or dictionaries you must provide Ice type name in form MyModule.MySeq or ::MyModule::MySeq:

import {iceToBuffer, bufferToIce} from 'ice-dump';

const buffer = iceToBuffer(sequence, 'MyModule.MySeq'); // Uint8Array

const readSequence = bufferToIce(buffer, 'MyModule.MySeq');
4.3.0

4 years ago

4.2.0

5 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.0.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago