MCPcopy
hub / github.com/gildas-lormeau/zip.js / getDataDescriptorInfo

Function getDataDescriptorInfo

index-native.cjs:5469–5493  ·  view source on GitHub ↗
({
	zip64,
	dataDescriptor,
	dataDescriptorSignature
})

Source from the content-addressed store, hash-verified

5467}
5468
5469function getDataDescriptorInfo({
5470 zip64,
5471 dataDescriptor,
5472 dataDescriptorSignature
5473}) {
5474 let dataDescriptorArray = new Uint8Array();
5475 let dataDescriptorView, dataDescriptorOffset = 0;
5476 let dataDescriptorLength = zip64 ? DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH : DATA_DESCRIPTOR_RECORD_LENGTH;
5477 if (dataDescriptorSignature) {
5478 dataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;
5479 }
5480 if (dataDescriptor) {
5481 dataDescriptorArray = new Uint8Array(dataDescriptorLength);
5482 dataDescriptorView = getDataView(dataDescriptorArray);
5483 if (dataDescriptorSignature) {
5484 dataDescriptorOffset = DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;
5485 setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);
5486 }
5487 }
5488 return {
5489 dataDescriptorArray,
5490 dataDescriptorView,
5491 dataDescriptorOffset
5492 };
5493}
5494
5495function setEntryInfo({
5496 signature,

Callers 1

addFileFunction · 0.70

Calls 2

getDataViewFunction · 0.70
setUint32Function · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…