Metadata-Version: 2.4
Name: rhodochrosite
Version: 25.0.0
Summary: Ruby marshal and unmarshal library
Author-Email: Lura Skye <fuyukaii@proton.me>, Loris Lacuna <doriloris@protonmail.com>
License-Expression: GPL-3.0-or-later
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Ruby
Project-URL: Homepage, https://codeberg.org/lacusdoloris/rhodochrosite
Requires-Python: >=3.13
Requires-Dist: attrs>=25.4.0
Description-Content-Type: text/x-rst

Rhodochrosite
=============

Rhodochrosite is a Python 3.13+ library for loading and saving objects in the Ruby marshal format.

Usage
-----

Use ``rhodochrosite.read_object``::

    from rhodochrosite import read_object

    print(read_object(b'\x04\b"\babc'))

For custom objects, use ``MarshalReader``::

    from rhodochrosite import MarshalReader, RubySymbol

    data = MarshalReader.from_bytes(...)
    data.object_factories[RubySymbol("MyType")] = _make_my_type
    my_object = data.next_object()

Format support
--------------

Rhodochrosite supports all known features of Ruby's Marshal format, up to Ruby 3.4. Object links
are supported when *reading*, but not when *writing*; this has no practical affect other than some
written files being larger than their input size.
