[decode] use descriptor array when passed it
[encode] refacotre blocks
[encode] add message encode feature