A bytestream coder decoder with proper event listeners, extracted from haz.data.codec