You can buy this project and download/modify it how often you want.
package com.qcloud.cos.utils; interface Codec { public byte[] encode(byte[] src); public byte[] decode(byte[] src, final int length); }