Skip to content

kuroneko/unpickle-rb

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

unpickle

This is a very limited tool to unpickle python 'pickle' objects.

Usage

require 'unpickle'

fh = File.open('some.pickle')
o = Unpickle.loads(fh.read)

loads() will raise Unpickle::UnpickleException if it doesn't support an opcode in the picklestream, or encounters some kind of problem or invalid sequence.

Limitations

Currently unpickle only supports protocol 0.

It only supports Integers (not Longs), Strings (non-unicode), booleans, dictionaries, lists, tuples and None.

Tuples will be returned as a frozen array.

None will be returned as nil.

TODO

  • Support more of protocol 0.
  • Support newer protocols.

Author

Chris Collins chris.collins@anchor.net.au

About

Ruby Library to unpickle (simple) Python pickles

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages