Jelly, 13 bytes
Encode, 7 bytes
1,0ṁx‘Ḅ
Decode, 6 bytes
ȯIBŒɠ’
Encodes positive integers in the run lengths of the binary representation. Since we may have zeros, we increment all numbers. For example, the list [0,1,4]
is encoded as 10011111 in binary.