UNPKG

ngx-uploadx

Version:
22 lines (21 loc) 752 B
/** * Adaptive chunk size */ export declare class DynamicChunk { /** Maximum chunk size in bytes */ static maxSize: number; /** Minimum chunk size in bytes */ static minSize: number; /** Initial chunk size in bytes */ static size: number; static minChunkTime: number; static maxChunkTime: number; /** * Scales the chunk size based on the throughput. * If the elapsed time to upload a chunk is less than the min time, increase the chunk size. * If the elapsed time is more than the max time, decrease the chunk size. * Keeps the chunk size within the min and max limits. * @param throughput - represents the upload rate in bytes/sec. */ static scale(throughput: number): number; }