Revert "Delete b_encode.h"

This reverts commit da03621dad5b9919364aa7b25741a83a6c85dde0.