eris.Encoder¶
- class eris.Encoder(convergence_secret, store=<eris.store.NullStore object>, block_size=32768)¶
Encode content to a store
The interface is inspired by asyncio.StreamWriter.
- __init__(convergence_secret, store=<eris.store.NullStore object>, block_size=32768)¶
Initialize an ERIS encoder.
- Parameters
store (eris.Store) – Store where encoded blocks will be stored.
block_size (int) – Block size (either 1024 or 32768).
convergence_secret (bytes) – Convergence secret to use when encoding (see <http://purl.org/eris#name-convergence-secret>). Must be exactly 32 bytes.
Methods
__init__
(convergence_secret[, store, block_size])Initialize an ERIS encoder.
close
()Finish encoding some content and return the read capability of the encoded content.
write
(b)Add some bytes of content b to encoded content.