Make encode and decode accessable standalone