Merge "[magma] Add magma encoder"