avoid buf_size == 0 checks in every decoder