function formatHeader(data) {
  const encoder = new TextEncoder(), buffer = clean(512);
  let offset = 0;
  ustarStructure.forEach(function (value) {
    const entry = encoder.encode(data[value.field] || "");
    buffer.set(entry, offset);
    offset += value.length; // space it out with nulls
  });
  return buffer;
}
/**
 * Create header for a file in a tar archive
 */
Create header for a file in a tar archive
Create header for a file in a tar archive
function formatHeader(data) {
  const encoder = new TextEncoder(), buffer = clean(512);
  let offset = 0;
  ustarStructure.forEach(function (value) {
    const entry = encoder.encode(data[value.field] || "");
    buffer.set(entry, offset);
    offset += value.length; 
  });
  return buffer;
}
function formatHeader ( data ) { const encoder = new TextEncoder ( ) , buffer = clean ( 512 ) ; let offset = 0 ; ustarStructure . forEach ( function ( value ) { const entry = encoder . encode ( data [ value . field ] || "" ) ; buffer . set ( entry , offset ) ; offset += value . length ; } ) ; return buffer ; }
Create header for a file in a tar archive
Create header for a file in a tar archive
// space it out with nulls