Base encoder and decoder online