Prime Factor Encoding
05AB1E, 13 bytes

Encoder, 8 bytes

0ì¥ĀηOØP


Try it online!

Explanation

0ì          # prepend 0 to input
  ¥         # calculate deltas
   Ā        # truthify each
    η       # calculate prefixes
     O      # sum each
      Ø     # get the prime at that index
       P    # product


Decoder, 5 bytes

Ò.ØÉJ


Try it online!

Explanation

Ò       # get prime factors of input
 .Ø     # get their indices among the primes
   É    # check for oddness
    J   # join