private int getSizeKbPermitsByBytes(int sizeInByte) {
        int tmpValue = sizeInByte + this.paddingSizePerPkg;
        if (tmpValue % SdkConsts.UNIT_KB_SIZE == 0) {
            return (tmpValue / SdkConsts.UNIT_KB_SIZE);
        } else {
            return (tmpValue / SdkConsts.UNIT_KB_SIZE) + 1;
        }
    }
Package Cache Quota class

Used to manage the total number and byte size of ongoing requests.
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/PkgCacheQuota.java