Encode and decode ZeroC Ice objects manually into Ice binary format

Usage no npm install needed!

<script type="module">
  import iceDump from '';


Ice Dump npm version Build Status

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


npm install ice-dump


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');