WSP encoder and decoder library