Skip to content

Instantly share code, notes, and snippets.

@esc
Created December 6, 2012 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esc/4224119 to your computer and use it in GitHub Desktop.
Save esc/4224119 to your computer and use it in GitHub Desktop.
Bloscpack Public API Design

Bloscpack Public API Design

pack()
pack_fp()
unpack()
unpack_fp()
BloscpackFile()

Arguments

For compression, there can be multiple types of input and output:

  • Input
    • file like
    • file name
    • plain string or bytes
    • list of buffers Blaze interface
    • numpy array
  • Output
    • file like e.g. cStringIO

For decompression, obviously the input and output roles are interchanged.

Keyword arguments

The pack and unpack family of functions should be callable with sensible default arguments.

File Abstraction

The BloscpackFile abstraction should be used for the following use-cases:

  • Inspection of file settings and metadata
  • Stepwise compression
  • Partial decompression

Avoid Copying

Special care should be taken to avoid copying data unnecessarily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment