Error formatting macro: pagetree: java.lang.NullPointerException
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

The Problem

Working with binary I/O often requires imperative-style interop. Testing binary I/O, interactively or non-, is made harder by the lack of a literal representations for byte streams.

How can we represent an ordered, possibly infinite, collection of bytes?

Desiderata

Ideally, this representation would be:

  • pr/read-able
  • representable as a string in a specific encoding
  • compatible with Clojure's sequence API
  • efficient for streaming I/O of large binary objects
  • lazy, i.e., the entire collection need not exist in memory at one time
  • compatible with java.io and java.nio interfaces
Labels: