Made a second version of ec_{en|de}code optimised for encoding bits (no div