Skip to main content

I use these functions to serialise and de-serialise non-negative integers of arbitrary size and run length encoded block data.

The integers are encoded as octets in big-endian order, with the high bit indicating that more octets follow.

  • get_bs(bs, offset=0): collect an integer from the bytes bs at the specified offset

  • get_bsdata(bs, offset=0): collect a run length encoded data block from the bytes bs at the specified offset

  • get_bsfp(fp): collect an integer from the binary file fp

  • put_bs(n): return the bytes encoding of the supplied integer n

  • put_bsdata(data): return the bytes run length encoding of the supplied data block

Release files for cs.serialise 20150116

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs.serialise 20150116
File Size Uploaded
cs.serialise-20150116.tar.gz 2.4 kB Details

Release files / cs.serialise-20150116.tar.gz

Download URL cs.serialise-20150116.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ac71bd26f2b138abd080eedb44f8adfc5580d068739c19b934e3a0286a9fcc3d
BLAKE2b-256 checksum
How to use checksums
ce6ca2152f7d112988d0b44216afc5bbb50330bd40359709fa7ffc729814b5d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

20150116 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page