Complete encoder (needs to save to file only)