Implement correct usage of encoders
Fix compile error
Correctly implement stream/writer after getting some feedback from the jsr ml