SegmentReader / SegmentWriter wip. DOES NOT COMPILE