New: batch-encode