CarWriter constructor
Creates a writer for a CAR archive with the given roots.
Set v2 to true to wrap the archive in a CAR v2 envelope.
Set index to true to build an index (CAR v2 only).
Implementation
CarWriter({
required this.roots,
this.v2 = false,
this.index = false,
this.multihashIndex = false,
this.maxBlockSize = 32 * 1024 * 1024,
}) {
if (index && !v2) {
throw ArgumentError('CAR index is only supported for CAR v2');
}
}