{"id":15175358,"url":"https://github.com/electron/node-chromium-pickle-js","last_synced_at":"2025-10-01T12:31:16.778Z","repository":{"id":30933941,"uuid":"34491932","full_name":"electron/node-chromium-pickle-js","owner":"electron","description":"Binary value packing and unpacking library compatible with Chromium's Pickle class","archived":true,"fork":false,"pushed_at":"2021-06-17T23:04:49.000Z","size":11,"stargazers_count":22,"open_issues_count":3,"forks_count":11,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-30T00:00:43.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-24T01:49:23.000Z","updated_at":"2023-05-03T16:26:15.000Z","dependencies_parsed_at":"2022-09-16T14:11:42.010Z","dependency_job_id":null,"html_url":"https://github.com/electron/node-chromium-pickle-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fnode-chromium-pickle-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fnode-chromium-pickle-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fnode-chromium-pickle-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fnode-chromium-pickle-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron","download_url":"https://codeload.github.com/electron/node-chromium-pickle-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234801276,"owners_count":18888868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-27T12:23:13.236Z","updated_at":"2025-10-01T12:31:11.414Z","avatar_url":"https://github.com/electron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chromium-pickle-js [![Build Status](https://travis-ci.org/electron/node-chromium-pickle-js.svg?branch=master)](https://travis-ci.org/electron/node-chromium-pickle-js)\n\nThis module ports Chromium's `Pickle` class to Node, see `Pickle`'s header for\nintroduction:\n\n\u003e This class provides facilities for basic binary value packing and unpacking.\n\u003e\n\u003e The Pickle class supports appending primitive values (ints, strings, etc.)\n\u003e to a pickle instance.  The Pickle instance grows its internal memory buffer\n\u003e dynamically to hold the sequence of primitive values.   The internal memory\n\u003e buffer is exposed as the \"data\" of the Pickle.  This \"data\" can be passed\n\u003e to a Pickle object to initialize it for reading.\n\u003e\n\u003e When reading from a Pickle object, it is important for the consumer to know\n\u003e what value types to read and in what order to read them as the Pickle does\n\u003e not keep track of the type of data written to it.\n\u003e\n\u003e The Pickle's data has a header which contains the size of the Pickle's\n\u003e payload.  It can optionally support additional space in the header.  That\n\u003e space is controlled by the header_size parameter passed to the Pickle\n\u003e constructor.\n\n## Install\n\n```bash\n$ npm install chromium-pickle-js\n```\n\n## Usage\n\n### createEmpty()\n\nReturns an empty `Pickle` object.\n\n### createFromBuffer(buffer)\n\n* `buffer` Buffer\n\nReturns a `Pickle` object that initialized from a `buffer`. The data is not\ncopied so you have to ensure the `buffer` lives when using the Pickle object,\nand you should never modify the Pickle object created this way.\n\n### Pickle.createIterator()\n\nReturns a `PickleIterator` object that can be used to read data from this\n`Pickle` object.\n\n### Pickle.toBuffer()\n\nReturns a `Buffer` object that contains this `Pickle` object's data.\n\n### Pickle.writeBool(value)\n\nWrites `value` to `Pickle` object as `bool`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeInt(value)\n\nWrites `value` to `Pickle` object as `int`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeUInt32(value)\n\nWrites `value` to `Pickle` object as `uint32`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeInt64(value)\n\nWrites `value` to `Pickle` object as `int64`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeUInt64(value)\n\nWrites `value` to `Pickle` object as `uint64`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeFloat(value)\n\nWrites `value` to `Pickle` object as `float`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeDouble(value)\n\nWrites `value` to `Pickle` object as `Double`. Returns `true` when succeeded and\nreturns `false` when failed.\n\n### Pickle.writeString(str)\n\n* `str` String\n\nWrites `str` to `Pickle` object. Returns `true` when succeeded and returns\n`false` when failed.\n\n### PickleIterator.readBool()\n\nReturns current value as `bool` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readInt()\n\nReturns current value as `int` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readUInt32()\n\nReturns current value as `uint32` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readInt64()\n\nReturns current value as `int64` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readUInt64()\n\nReturns current value as `uint64` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readFloat()\n\nReturns current value as `float` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readDouble()\n\nReturns current value as `double` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n\n### PickleIterator.readString()\n\nReturns current value as `String` and seeks to next data. A`TypeError` exception\nwould be thrown when failed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Fnode-chromium-pickle-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron%2Fnode-chromium-pickle-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Fnode-chromium-pickle-js/lists"}