---
title: "parseTarHeader"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/tar-parser/src/lib/tar.ts#L205"
---

# parseTarHeader

## Summary

Parses a tar header block.
With the default `relative` path policy, throws [`TarParseError`](/tar-parser/class/TarParseError/) for invalid
entry names or link targets, including paths that traverse above the archive root.

## Signature

```ts
function parseTarHeader(block: Uint8Array, options: ParseTarHeaderOptions): TarHeader

```

## Parameters

### `block`

The tar header block

### `options`

Options that control how the header is parsed

## Returns

The parsed tar header