Refactoring the encoding loop as a prelude to supporting
multi-threading. Tidied up the top-level interfaces too...
Authored by: wackston 2001-02-19
Parent: [r311]
Child: [r313]