use Base.parse(mime, io) instead of custom parsing logic