Function type for building custom headers for each chunk
typedef HeaderBuilder = Map<String, String> Function( int chunkIndex, int totalChunks);