LZJB implementation forked from FreeBSD