Added subroutines for JCodec encoding. Untested.
Added subroutines for JCodec, untested.