Skip to end of metadata
Comment: Migrated to Confluence 4.0
Go to start of metadata

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:
  1. User icon: hiredman

    Jul 08, 2011

    functions for treating seqs/lists/vectors/whatever like IO Lists from erlang (http://prog21.dadgum.com/70.html) but be useful too

  2. User icon: bsmith.occs@gmail.com

    Nov 04, 2011

    "compatible with Clojure's sequence API" At what granularity? If we're talking sequence of individual bytes, then this applies at least one object allocation per byte during traversal. That contradicts "efficient for streaming I/O of large binary objects".


AltStyle によって変換されたページ (->オリジナル) /