zigzag algo sketch
add zigzag encoding

analytic zigzag 1
use analytic solution to zigzag-problem