SUBMIT A FILE TYPE CONTACT US SUPPORT ABOUT US

What Is a LEF File? Chip Layout, Swim Meet or Evidence File? The First Bytes Decide

A LEF file can be a chip layout, swim meet data or an evidence file, so read the first bytes to name the kind. Jump to your question below, or work through it in order.

37 min read Updated October 2026 Checked against sources and tests

What Is a LEF File? Chip cells, swim meets and evidence files share one ending

Short answer

LEF files end in .lef, and three different kinds of file use that ending. The most common kind is text that describes chip cells and layers. The other two are swim meet data in Lenex XML and evidence files that two viewer makers call EnCase LEF files.

We read 168 public chip LEF files with four readers, and we damaged one file in 63 ways. On 7 broken copies all three readers loaded the file and printed no message, and our own 99 line script missed 5 broken copies.

To name your file, go to the first bytes. To open it, go to the opening steps. To check it, go to the six steps.

LEF files end in .lef, and the ending has three meanings. Most are Library Exchange Format files, which are ASCII text that describes chip cells and layers. Others are Lenex files with swim meet data in XML. The third kind is what two viewer makers call an EnCase evidence file.

LEF is short for Library Exchange Format. Wikipedia on LEF calls it an accepted standard that writes the physical layout of an integrated circuit in ASCII. Chip LEF files list library data about cells and modules, plus layer and via data and the boundaries that place and route tools need.

Aki Fujimura developed the LEF file format and its partner format DEF at Tangent Systems, and Cadence bought those tools in 1989. Si2 on LEF and DEF now distributes both formats under the Apache-2.0 license, and its page says Cadence Design Systems developed them. It lists the 5.8 and 6.0 series.

FileInfo lists one type for the .lef ending, the Lenex file with swim meet data. It names Splash Meet Manager and any text editor as programs that open it. Chip LEF files are missing from that list, and so are evidence files.

The third meaning comes from digital forensics. SysTools and Freeviewer describe the EnCase Logical Evidence File as .lef files. PRONOM and the forensics wiki use other names. They list the format as .L01 and its newer form as .Lx01.

Where our LEF files come from

We wrote one chip LEF file ourselves, so it contains no secrets. It has 2 cells, 9 pins and 1 site in 1,581 bytes and 109 lines. It has no layer blocks, because one of our four readers refuses them.

We also collected 214 public LEF files from two open source projects, OpenROAD and OpenROAD Flow Scripts. They are 171 different files by SHA-256 hash. We read 168 of them and skipped the three largest, which range from 17 MB to 103 MB.

For swim files we used 38 samples from two open source Lenex projects. 33 end in .lxf and 5 end in .lef. We found no public EnCase file, so we tested no evidence file.

LEF file facts at a glance

Quick facts about LEF files
Property Value
Meaning Three. Library Exchange Format for chips and Lenex for swim meets. The third is the EnCase Logical Evidence File, in the words of two viewer makers.
Made by Chip design tools, swim meet programs and EnCase.
Format ASCII text for chips, XML for Lenex and a binary signature for EnCase evidence files.
Start Chip LEF files start with VERSION or #. Lenex .lef files start with <?xml. EnCase files start with the bytes 4C 56 46.
Standard Chips have the LEF and DEF Language Reference, with versions 5.8 and 6.0 on Si2. Lenex has the version 3.0 document, dated 31 January 2015.
Opens with A text editor, KLayout and other chip tools, Splash Meet Manager, any ZIP tool for .lxf files and two Windows viewers for EnCase files.
Size in our set 268 bytes to 9.7 MB for chip files, with a median of 36,840 bytes. Lenex .lxf files range from 1,255 to 117,123 bytes.
Our tests 168 public LEF files, 1 file damaged in 63 ways, 38 Lenex files, four readers and a script.

Wrong page? Look at the ELF page for Linux programs, the E01 page for EnCase disk images or the DWG page for CAD drawings.

What Is Inside a LEF File? One chip file, part by part, from the version line to END LIBRARY

Our chip LEF file has 109 lines and 2 macros. The version line comes first and END LIBRARY comes last. Every statement ends with a semicolon, and a space comes before it.

The figure shows our LEF file, shortened. The numbers match the parts below. Read it from the top, because every block opens with its name and closes with END and the same name.

A shortened chip LEF file with eight numbered parts: the version line, the units block, a site, a macro, a pin, a port with one rectangle, the END lines that close every block, and the END LIBRARY line that closes the file.
Our small chip LEF file, shortened for the figure. The numbers match the parts explained below.

The version line

Our LEF file starts with VERSION 5.8 ;. Of the 168 public LEF files, 72 start with that line and 96 start with a # comment. The public files use five versions between 5.3 and 5.8, and 5.7 leads with 121 files. Si2 lists the 6.0 series too, and we found no public file that uses it.

The units block

The block UNITS DATABASE MICRONS 1000 ; says how many database units fit in one micron. Only 37 of the 168 public LEF files have the units block. Of those, 29 use 2000, 6 use 1000 and 2 use 4000.

Sites, macros and pins

The SITE block gives the site its name and size, and every macro in our LEF file points to it. Every MACRO block describes one cell with its class, size and symmetry. PIN blocks follow for every connection. Our two macros have 9 pins. The 168 public files have 7,993 macros and 62,090 pins. The largest file has 441 macros.

The full macro from our LEF file
MACRO inv_x1
  CLASS CORE ;
  ORIGIN 0 0 ;
  FOREIGN inv_x1 0 0 ;
  SIZE 0.8 BY 2.0 ;
  SYMMETRY X Y ;
  SITE core ;
  PIN A
    DIRECTION INPUT ;
    USE SIGNAL ;
    PORT
      LAYER M1 ;
        RECT 0.1 0.6 0.3 0.8 ;
    END
  END A
  PIN Y
    DIRECTION OUTPUT ;
    USE SIGNAL ;
    PORT
      LAYER M1 ;
        RECT 0.5 0.4 0.7 1.2 ;
    END
  END Y
  PIN VDD
    DIRECTION INOUT ;
    USE POWER ;
    PORT
      LAYER M1 ;
        RECT 0 1.9 0.8 2.0 ;
    END
  END VDD
  PIN VSS
    DIRECTION INOUT ;
    USE GROUND ;
    PORT
      LAYER M1 ;
        RECT 0 0 0.8 0.1 ;
    END
  END VSS
END inv_x1

Ports and rectangles

Every pin has a PORT block, and the port lists layers with RECT lines. Every RECT gives two corners in microns, the lower left first. The rectangle of pin A in the macro above is 0.2 microns wide and 0.2 microns tall.

The END lines

Every block closes with END and its own name, like END inv_x1. PORT and OBS blocks close with END alone.

The LEF file closes with END LIBRARY. 162 of the 168 public LEF files have that line and 6 do not. KLayout and lefdef loaded all 6. lef21 stopped at the end of 5 of them and at the ROWPATTERN statement in the sixth.

Comments

The # sign starts a comment, and the reader ignores the rest of the line. 105 of the 168 public LEF files contain comment lines.

Comments are safe, because copy 46 with a comment line and copy 47 with a semicolon inside the comment loaded in all three readers. Copy 48 used /* */ comments instead, and two readers refused it.

We read this layout from one small file and 168 public LEF files. The rules come from our tests and from Wikipedia. Our LEF file has no layer or via blocks, and the kinds part shows those. Files from other tools can differ, and we tested only the ones named here.

Which Kinds of LEF File Exist? Three meanings, and the first bytes that separate them

Three kinds of file end in .lef. Chip LEF files are ASCII text. Lenex files are XML, and their ZIP form ends in .lxf. EnCase evidence files start with the bytes 4C 56 46 and are stored as .L01 or .Lx01. The first bytes separate the three.

The figure puts the three kinds side by side. Chip LEF files also come in two flavors, which the next part explains.

Three kinds of file that end in .lef. A Cadence and Si2 LEF file is ASCII text that describes chip cells and layers. A Lenex file is XML or a ZIP archive with swim meet data. An EnCase Logical Evidence File starts with the bytes 4C 56 46 and is stored by EnCase as .L01 or .Lx01.
Three different files share the .lef ending. The first bytes separate them.

Chip LEF files

Chip LEF files define either cells or layers. Of the 168 public LEF files, 133 define cells only, 34 define layers and vias only and 1 defines both. Layer files have LAYER and VIA blocks. Cell files have MACRO blocks, the kind our LEF file has.

Lenex files

Lenex is an XML format for swim meet data. The Lenex 3.0 document says the XML file is .lef and the common ZIP form is .lxf. It names Christian Kaufmann of Switzerland as the creator and dates version 3.0 as 31 January 2015.

All 38 of our samples have a root element named LENEX with version 3.0. The 33 .lxf files are ZIP archives, and every one contains one .lef file. The 5 .lef samples are XML text files. 37 of the 38 use UTF-8, and one uses Windows-1252. The document recommends UTF-8.

EnCase evidence files

SysTools and Freeviewer both say their viewers open EnCase .lef files from EnCase 1 to 7. PRONOM lists the format as Logical File Evidence Format with the extension L01, and says it began in EnCase 5.

Its signature is the eight bytes 4C 56 46 09 0D 0A FF 00 at the start of the file. Later segments are .L02 to .L99 and then .LAA.

The forensics wiki says the EnCase Logical Evidence File, also called EWF-L01, stores single files. It lists Lx01 (EWF2-LX01) as the second version, with bzip2 compression and no encryption. Logical evidence files store single files and not the entire disk, so they differ from the E01 images that copy a drive.

Public samples of these files are rare. We found none, so we tested no EnCase file. Our script checks the first eight bytes against the PRONOM signature and nothing more. We tested that check on an eight byte stub we made ourselves.

Name the kind in ten seconds

How the first bytes identify a .lef file
First bytes What the file is
VERSION or # A chip LEF file. It is ASCII text that any editor shows.
<?xml A Lenex .lef file. It is XML text with a LENEX root element.
50 4B 03 04 A ZIP archive. In swim meet software it is a Lenex .lxf file.
4C 56 46 09 0D 0A FF 00 EnCase logical evidence file, per the PRONOM signature.
Two commands that name the kind
head -c 16 mystery.lef | xxd
file mystery.lef

The file command printed ASCII text for our chip LEF file, XML 1.0 document for the Lenex .lef files and Zip archive data for the .lxf files. It printed data for the eight byte stub we made with the EnCase signature, so it does not name that kind.

Not sure the file is a LEF file at all? Check the first bytes with our script.

What Do 168 Public LEF Files Contain? Cells, layers, versions and four readers

We read 168 public chip LEF files. 133 define cells only, 34 define layers only and 1 defines both. KLayout and lefdef loaded almost every file, and lef21 loaded only 83. A reader that stops does not prove a LEF file is bad.

The figure shows the files and the readers. The files come from the OpenROAD test folder and the OpenROAD Flow Scripts platforms, so they describe open chip kits and test chips. They show how public LEF files look. They do not stand for every LEF file.

168 public chip LEF files
7,993 macros in those files
62,090 pins in those files
37 MB of text to read
Bars show 168 public chip LEF files by kind and version, and how four readers handled them. KLayout and lefdef accepted almost all, the Rust reader lef21 accepted 83, and our script found a problem in 7.
168 public chip LEF files and four readers. A reader that stops on a file does not prove the file is bad.

Where the files come from

We listed 214 LEF files in the two projects and found 171 different files by hash. The 168 LEF files we read total 37,183,121 bytes. The smallest has 268 bytes, the largest has 9,706,517 bytes and the median file has 36,840 bytes. None uses CRLF line endings, and 13 contain a character beyond ASCII.

What the four readers did

lefdef loaded all 168 LEF files. KLayout loaded 167 and refused one LEF file, gf180mcu_fd_io.lef, at line 815 because it defines the macro gf180mcu_fd_io__asig_5p0 twice. Our script found 14 repeated macro names in that file. We cannot say whether the project’s own tools accept it.

lef21 loaded 83 files. It read 83 of the 133 LEF files that define cells only and none of the 35 files with layers. It stopped at 56 files on statements it marks as unsupported. PROPERTYDEFINITIONS caused 44 of those stops.

A stop is not proof of a bad LEF file, because KLayout and lefdef loaded all 85 files that lef21 refused.

Our script found a problem in 7 files. Six have no END LIBRARY line, and the seventh is the file with repeated macros. The other 161 passed.

Cells and layers rarely share a file Only 1 of the 168 files defines both.
Version 5.7 leads 121 of the 168 files use it, and 36 use 5.8.
Comments are common 105 of the 168 files contain # lines.
Refusals are not proof lef21 stopped at 85 files that two other readers loaded.

What the numbers do not show

We read the LEF files as text and with four readers. We opened none in any place and route tool, so we cannot say whether the layouts work. Both projects publish open kits, and files from commercial kits can differ.

What Happens When a LEF File Is Damaged? 63 broken copies and 7 that passed all three readers

We damaged one chip LEF file in 63 ways and loaded every copy in three readers. All three readers loaded 7 broken copies without any message, and our script missed 5. Only 12 of the 63 edits were harmless.

We changed one thing at a time and sorted the 63 copies of the LEF file into nine groups. They cover encoding, semicolons, END lines, the header, numbers, names, cuts, random bytes and the wrong kind of file. Copy numbers match the rows of the figure.

A grid of 63 copies of one chip LEF file in nine groups, read by the file command, by KLayout, by lefdef, by lef21 and by our own script. Cells show how many of the 2 macros every reader loaded, or whether it stopped with a message.
63 copies of one LEF file, read by five checks. Cells show how many of the 2 macros loaded.

Green means a reader loaded the 2 macros and printed nothing. Amber means it loaded another number of macros and printed nothing. Red means it stopped with a message. The file column shows what the file command said. We counted macros and did not compare every coordinate.

The file command sees the encoding and little else

The file command printed ASCII text for 44 of the 51 damaged copies, the same words it printed for our intact LEF file. It named the other seven, which are CR line endings, a byte order mark, UTF-16, an accented letter, a NUL byte, the Lenex XML and the empty file. It saw no missing semicolon and no wrong number.

Three readers, three sets of rules

KLayout stopped with a message on 27 of the 51 damaged LEF files, lefdef on 39 and lef21 on 42. All three stopped on 24 copies, and they disagree on 20 more.

KLayout reads geometry and skips what it does not know. It loaded copy 10 with one missing semicolon, copy 26 with version 9.9 and copy 40 with a misspelled DIRECTION.

lefdef is strict and then ends the process. After every parse error it printed the file, the line and the token. Python then stopped with a C++ exception. That happened on 39 copies, so start lefdef in a child process. It loaded the UTF-16 LEF file (copy 4) as an empty library and printed nothing.

lef21 is the strictest reader that returns an error, and it refused 42 copies. It accepted the CR only LEF file (copy 2) that KLayout and lefdef refused. Version 3.0.0-pre.2 crashed on a macro name with an accented letter (copy 8), and it cannot read layer blocks at all.

All three readers miss the same damage

On 7 copies none of the three readers printed any message. They are copies 21, 23, 36, 38, 39, 43 and 44.

The damage is an END LIBRARY line above the last macro and one more END LIBRARY. The rest are negative macro sizes, pins outside their macros, swapped corners, two pins with one name and sites that are never defined.

Copy 21 shows how quietly a LEF file can lose macros. KLayout loaded both macros. lefdef and lef21 loaded 1 macro and printed nothing, because they stop reading at the first END LIBRARY. The second macro vanished.

Copy 24 repeats one macro. KLayout refused it with its own message. lefdef and lef21 loaded 3 macros without comment. Copy 61 is the Lenex XML file saved as a .lef file. KLayout loaded it as an empty library and printed nothing, and the empty file (copy 62) got the same result from KLayout and lefdef.

Damage that no reader cares about

12 edits changed nothing that a reader needs. CRLF line endings (copy 1) and tabs (copy 5) loaded in all three readers. So did the missing final line break (copy 6) and the entire file on one line (copy 7). Lowercase keywords (copy 15), the lowercase file (copy 16) and the comments (copies 46 and 47) loaded too.

The removed version line (copy 25), version 5.3 (copy 27), the moved version line (copy 28) and the removed units block (copy 29) also loaded everywhere.

Every semicolon needs a space before it. Copy 12 removed only that space, and all three readers refused it.

Our script sees syntax and misses meaning

Our script printed messages on 46 of the 51 damaged LEF files and stayed silent on 5. It also raised 1 false alarm on the 12 harmless copies. That false alarm is copy 7, because the script reads line by line and the copy has one line.

The 5 misses are copies 8, 38, 39, 43 and 44.

A script that reads a LEF file as text cannot know where a pin belongs, and a duplicate pin name is legal in public files. A site can be defined in a second file. The accented letter is a fault in lef21 only, and we did not teach our script about it.

What the groups show

Results by group of damaged LEF files
Group What we found
A. Encoding (1 to 9) CRLF, tabs, the missing final line break and the one line file loaded everywhere. The byte order mark and UTF-16 fooled or stopped three readers in three ways. The NUL byte stopped lefdef and lef21 and not KLayout.
B. Semicolons (10 to 16) Only KLayout loaded copy 10 with one missing semicolon. All three refused the missing space before the semicolon (copy 12), the double semicolon and the colon in its place.
C. END lines (17 to 24) The wrong name after END fooled lefdef. The removed END LIBRARY fooled KLayout and lefdef. One more END LIBRARY fooled all three. The repeated macro fooled lefdef and lef21.
D. Header (25 to 31) Version 9.9, units of 0 and an unquoted BUSBITCHARS value loaded in KLayout. lefdef stopped on all three, and lef21 stopped on all three.
E. Numbers (32 to 39) Text in place of numbers, RECTs with three or five numbers and decimal commas stopped all three. Negative sizes, pins outside the box and swapped corners loaded in all three.
F. Names (40 to 48) Misspelled keywords, unknown directions and unknown statements loaded in KLayout only. Duplicate pins and missing sites loaded in all three. The /* */ style stopped lefdef and lef21.
G. Cut short (49 to 54) Cuts at 25, 50, 75 and 90 percent and a cut inside a pin stopped all three. Copy 54, with the last three lines deleted, loaded in KLayout.
H. Random bytes (55 to 60) All three readers stopped on all six copies, and our script flagged all six.
I. Wrong kind (61 to 63) KLayout loaded the Lenex file and the empty file as libraries with 0 macros. The DEF file stopped KLayout and lef21. lefdef aborted on it.

Read the grid with care. Green cells mean a reader found 2 macros. We loaded no LEF file into a place and route tool and compared no coordinates. A tool made for production can check more or less. Every test changed one thing in one small file.

What Does Our Expert Say About LEF Files? A note from Neeraj Singh on naming the kind before you load it

Check a LEF file before you hand it to a chip tool, and name its kind first. Readable files can still lose macros without any message. Our test shows 7 broken copies that passed all three readers.

Neeraj Singh

Expert insight

LEF files look harmless because they are text. In our test three readers loaded broken copies and printed no message. Check every LEF file before you hand it to a chip tool, and keep the original.

Neeraj Singh Manager, Tech Support & Operations 19+ years fixing Windows and system errors

Why a readable file is the risky one

People trust a file they can read. A LEF file opens in any editor and looks fine, so nobody checks it before the tool loads it. Our broken copies looked fine too, and 7 loaded in all three readers without a word.

The ending adds a second risk. The file results.lef can be swim meet data or evidence from a case. Read the first bytes before you decide what to do with it.

Keep the original. Copy the LEF file before you edit or convert it, and write down its SHA256 hash. The hash shows which file you received and whether a later copy differs.

How Do You Open a LEF File? A text editor, a layout viewer, a meet program or an unzip tool

Open chip LEF files in any text editor, or load them in KLayout. Open Lenex .lef files in any text editor or Splash Meet Manager, and unzip .lxf files first. EnCase evidence files need EnCase or a forensic viewer. Name the kind before you choose a program.

We tested readers on Linux with Python. We read the pages of the Windows tools below and installed none of them.

In a text editor

A chip LEF file and a Lenex .lef file are text, so any editor opens them. Save the LEF file as ASCII or UTF-8 with LF line endings. In our copies the CR only file stopped two readers (copy 2), and the byte order mark stopped two (copy 3).

Big chip LEF files are slow to scroll. The largest of our 168 files has 9,706,517 bytes and 192,164 lines. Use head -n 40 file.lef to see the start without opening the file.

In KLayout and other chip tools

KLayout 0.30.12 read 167 of our 168 public LEF files through its Python module. Four lines of Python load the file and count its cells. The count matched the two macros of our intact LEF file.

Four lines of Python in KLayout
pip install klayout
import klayout.db as db
layout = db.Layout()
layout.read("cells.lef")
print(layout.cells(), "cells")

lefdef 0.6.0 and lef21 3.0.0-pre.2 are libraries for programs and not viewers. Wikipedia says LEF files are used most in place and route tools. We used none of those tools.

Lenex files

FileInfo names two programs for Lenex .lef files, Splash Meet Manager and any text editor. It calls Splash Meet Manager a free program for Windows. An .lxf file is a ZIP archive, so any ZIP tool opens it. The file inside ends in .lef, as it did in all 33 of our .lxf samples.

Three commands that open a Lenex .lxf file
unzip -l results.lxf
unzip -p results.lxf > results.lef
xmllint --noout results.lef

xmllint accepted all 38 of our Lenex samples, and so did the Python XML module. One sample declares Windows-1252, and the others declare UTF-8.

EnCase evidence files

EnCase opens its own evidence files. These cards link to two Windows viewers that describe .lef files on their own pages. We read the pages and used neither program, because we found no sample file.

SysTools LEF Viewer

Opens EnCase LEF files on Windows

Free, no demo limit listed

Freeviewer LEF Viewer

Previews EnCase LEF files on Windows

Free demo

The SysTools page describes the free viewer for EnCase LEF files from EnCase 1 to 7. It lists scanning for damaged files, previews of documents, images and metadata and the graphical interface. It names Windows 10 and earlier. Its FAQ cites the 2 GB example, and the page sets no size limit.

The Freeviewer page describes the viewer for EnCase LEF files from EnCase 1 to 7 on Windows 10 down to XP. Its comparison table lists the free demo.

The page says files up to 500 MB work, and it also says there is no limit on file size or count. It lists image export to JPEG, PNG, BMP, TIFF and GIF. It also lists batch conversion.

Neither page mentions L01 or Lx01, which are the extensions PRONOM and the forensics wiki give. Test the demo on your own LEF file before you rely on it. Our E01 file guide covers the EnCase disk image format.

On the command line

Four commands show what a LEF file is without opening it in any program. They hash the file, print its first bytes, name its encoding and start our 99 line script. They work on any Linux or macOS computer.

Four commands to read a LEF file
sha256sum mystery.lef
head -c 16 mystery.lef | xxd
file mystery.lef
python3 lef_peek.py mystery.lef

How the checks did on our 51 damaged copies

How every check did on our 51 damaged LEF files
Check Result
file 5.45 Printed ASCII text for 44 copies. It named the other 7, which are four encodings, one data file, one empty file and the XML file. It never saw wrong numbers or missing semicolons.
KLayout 0.30.12 Stopped with a message on 27 copies. It loaded the 2 macros with no message on 22 and loaded 0 macros with no message on 2.
lefdef 0.6.0 Stopped on 39 copies, and every stop ended the process. It loaded the 2 macros on 8 and another number on 4, with no message.
lef21 3.0.0-pre.2 Stopped on 42 copies, including 1 crash. It loaded the 2 macros on 7 and another number on 2, with no message.
Our script Flagged 46 of the 51 damaged copies and 1 of the 12 harmless ones.

How Do You Check a LEF File? Six steps, and a 99 line script

Check a LEF file in six steps. Hash it, read its first bytes and name its encoding. Read it with our script that checks the structure, and load it in another reader. No check proves that the layout is right.

The six steps

  1. Copy the LEF file, write down its SHA256 hash and work on the copy.
  2. Read the first bytes with head -c 16 file.lef | xxd. Text that starts with VERSION or # is a chip LEF file. <?xml marks Lenex and PK marks ZIP archives.
  3. Name the encoding with file file.lef. You want ASCII text. A byte order mark, UTF-16 or CR line endings need fixing first.
  4. Use the script below. It reads the structure and counts the macros.
  5. Read the last lines of its output. Every problem gets its own line.
  6. Load the copy in another reader like KLayout, and compare its macro count with the script. Test in scratch projects, not live designs.

The 99 line script that reads LEF files

The Python script below does steps 2 to 5. It names Lenex, ZIP and EnCase files by their first bytes. For chip LEF files it checks the encoding, pairs every END with its block and checks semicolons.

It also checks numbers, SIZE and RECT lines, pin directions, repeated macro names and the closing line. It changes no file and starts no program.

lef_peek.py
#!/usr/bin/env python3
"""lef_peek.py: read a LEF file and report faults. It changes nothing and starts nothing."""
import re, sys, json

TOP = {'LAYER': 'layers', 'VIA': 'vias', 'SITE': 'sites', 'MACRO': 'macros', 'VIARULE': 'viarules', 'NONDEFAULTRULE': 'ndr'}
BLOCKS = ('PROPERTYDEFINITIONS', 'UNITS', 'SPACING', 'NOISETABLE', 'CORRECTIONTABLE', 'IRDROP', 'ARRAY', 'TIMING')
STMT = {'VERSION', 'BUSBITCHARS', 'DIVIDERCHAR', 'CLASS', 'ORIGIN', 'FOREIGN', 'SIZE', 'SYMMETRY', 'SITE', 'DIRECTION', 'USE',
        'RECT', 'LAYER', 'TYPE', 'PITCH', 'WIDTH', 'OFFSET', 'DATABASE', 'MANUFACTURINGGRID', 'POLYGON', 'PATH', 'VIA'}
SEEN = STMT | {'ANTENNADIFFAREA', 'ANTENNAGATEAREA', 'ANTENNAMAXAREACAR', 'ANTENNAMAXCUTCAR', 'ANTENNAMODEL',
               'ANTENNAPARTIALCUTAREA', 'ANTENNAPARTIALMETALAREA', 'ANTENNAPARTIALMETALSIDEAREA', 'EDGETYPE',
               'NETEXPR', 'PROPERTY', 'ROWPATTERN', 'SHAPE'}
DIRS = {'INPUT', 'OUTPUT', 'INOUT', 'FEEDTHRU', 'HORIZONTAL', 'VERTICAL'}
NUM = re.compile(r'^[+-]?(\d+\.?\d*|\.\d+)$')


def peek(path):
    raw = open(path, 'rb').read()
    out = dict(version=None, layers=0, vias=0, sites=0, macros=0, pins=0, endlib=False, errors=[])
    err = lambda n, m: out['errors'].append(f'line {n}: {m}' if n else m)
    for sig, what in ((b'<?xml', 'XML, so a Lenex swim meet file and not a chip LEF'), (b'PK\x03\x04', 'a ZIP archive, so a Lenex .lxf file'),
                      (b'LVF\t\r\n\xff\x00', 'the EnCase evidence file signature')):
        if raw.startswith(sig):
            err(0, 'starts as ' + what)
            return out
    if raw[:2] in (b'\xff\xfe', b'\xfe\xff'):
        err(0, 'saved as UTF-16, not ASCII')
        return out
    if raw[:3] == b'\xef\xbb\xbf': err(0, 'starts with a UTF-8 byte order mark')
    if b'\x00' in raw: err(0, 'contains a NUL byte')
    if b'\r' in raw.replace(b'\r\n', b''): err(0, 'uses bare CR line breaks')
    text = raw.decode('utf-8', 'replace').replace('\r\n', '\n').replace('\r', '\n')
    if '/*' in text: err(0, 'contains /* */ comments, which LEF does not use')
    stack, names, pending = [], set(), None
    for n, line in enumerate(text.splitlines(), 1):
        body = line.split('#')[0]
        t = body.split()
        if not t: continue
        k, args = t[0].upper(), body.replace(';', ' ').split()[1:]
        inmacro = any(x[0] == 'MACRO' for x in stack)
        if pending and (k in STMT or k in TOP or k in ('END', 'PIN', 'PORT', 'OBS')):
            err(pending, 'statement has no closing semicolon')
            pending = None
        if out['endlib']:
            err(n, 'second END LIBRARY' if k == 'END' else 'text after END LIBRARY')
            break
        if k == 'END' and [a.upper() for a in args[:1]] == ['LIBRARY']:
            out['endlib'] = True
        elif not stack and k in TOP and len(t) > 1:
            out[TOP[k]] = out.get(TOP[k], 0) + 1
            if k == 'MACRO' and t[1] in names: err(n, f'macro {t[1]} is defined twice')
            names.add(t[1])
            stack.append((k, t[1], n))
        elif not stack and k in BLOCKS:
            stack.append((k, '', n))
        elif inmacro and k == 'PIN' and len(t) > 1:
            out['pins'] += 1
            stack.append(('PIN', t[1], n))
        elif inmacro and k in ('OBS', 'PORT'):
            stack.append((k, '', n))
        elif k == 'END':
            name = t[1] if len(t) > 1 else ''
            if not stack:
                err(n, f'END {name} with nothing open')
            elif name == stack[-1][1] or name.upper() == stack[-1][0] or (not name and not stack[-1][1]):
                stack.pop()
            else:
                err(n, f'END {name} but {stack[-1][0]} {stack[-1][1]} (line {stack[-1][2]}) is open')
                for i in range(len(stack) - 1, -1, -1):
                    if stack[i][1] == name: del stack[i:]; break
        elif k in STMT:
            if ';' not in body and (inmacro or k in ('VERSION', 'BUSBITCHARS', 'DIVIDERCHAR', 'DATABASE')): pending = n
            if re.search(r'\S;', body): err(n, 'semicolon needs a space before it')
            if re.search(r';\s*;', body): err(n, 'double semicolon')
            if k == 'VERSION':
                out['version'] = args[0] if args else None
                if not (args and re.match(r'^5\.\d$|^6\.0$', args[0])): err(n, f'unknown LEF version {args[:1]}')
            elif k == 'RECT' and (len(args) != 4 or not all(NUM.match(a) for a in args)): err(n, 'RECT needs four numbers')
            elif k == 'ORIGIN' and not all(NUM.match(a) for a in args): err(n, 'ORIGIN needs numbers')
            elif k == 'SIZE':
                if len(args) != 3 or args[1].upper() != 'BY' or not (NUM.match(args[0]) and NUM.match(args[2])): err(n, 'SIZE needs two numbers joined by BY')
                elif float(args[0]) <= 0 or float(args[2]) <= 0: err(n, 'SIZE must be positive')
            elif k == 'DATABASE' and (len(args) != 2 or not args[1].isdigit() or int(args[1]) <= 0): err(n, 'DATABASE MICRONS needs a positive integer')
            elif k == 'BUSBITCHARS' and not (args and args[0].startswith('"') and args[0].endswith('"')): err(n, 'BUSBITCHARS needs quotes')
            elif k == 'DIRECTION' and args and args[0].upper() not in DIRS: err(n, f'unknown direction {args[0]}')
        elif inmacro and k not in SEEN and not NUM.match(k) and not k.startswith('(') and ';' in body:
            err(n, f'unknown statement {t[0]}')
    if pending: err(pending, 'statement has no closing semicolon')
    if stack: err(stack[0][2], f'{len(stack)} block(s) never closed, first is {stack[0][0]} {stack[0][1]}')
    if not out['endlib']: err(0, 'no END LIBRARY')
    return out


if __name__ == '__main__':
    r = peek(sys.argv[1])
    print(sys.argv[1])
    print(f"  version {r['version']}  macros {r['macros']}  pins {r['pins']}  sites {r['sites']}  layers {r['layers']}  vias {r['vias']}")
    for e in r['errors'][:12]: print('  PROBLEM', e)
    print('  ' + (f"{len(r['errors'])} problem(s) found" if r['errors'] else 'no problem found'))
    sys.exit(1 if r['errors'] else 0)

On our intact LEF file it finds 2 macros and 9 pins and no problem. On the largest of our 168 files, 9.7 MB, it needs about one second. On damaged files it names the line. It finds the missing semicolon in copy 10 and the five numbers in copy 34.

The script on our intact LEF file
python3 lef_peek.py cells.lef
  version 5.8  macros 2  pins 9  sites 1  layers 0  vias 0
  no problem found
The script on four damaged LEF files
python3 lef_peek.py copy-B1.lef
  version 5.8  macros 2  pins 9  sites 1  layers 0  vias 0
  PROBLEM line 16: statement has no closing semicolon
  1 problem(s) found

python3 lef_peek.py copy-C2.lef
  version 5.8  macros 2  pins 9  sites 1  layers 0  vias 0
  PROBLEM line 65: END nand2_x1 but PIN A (line 22) is open
  1 problem(s) found

python3 lef_peek.py copy-E3.lef
  version 5.8  macros 2  pins 9  sites 1  layers 0  vias 0
  PROBLEM line 27: RECT needs four numbers
  1 problem(s) found

python3 lef_peek.py copy-G2.lef
  version 5.8  macros 1  pins 5  sites 1  layers 0  vias 0
  PROBLEM line 15: 2 block(s) never closed, first is MACRO nand2_x1
  PROBLEM no END LIBRARY
  2 problem(s) found
The script on a Lenex file with the .lef ending
python3 lef_peek.py swim-meet.lef
  version None  macros 0  pins 0  sites 0  layers 0  vias 0
  PROBLEM starts as XML, so a Lenex swim meet file and not a chip LEF
  1 problem(s) found

What the script cannot see

The script reads text and not meaning. It printed nothing for copy 38, where the pin lies outside its macro. It also printed nothing for swapped corners (copy 39), two pins with one name (copy 43) and the site that is never defined (copy 44).

Public LEF files can repeat pin names, and the site can live in another file, so we left those checks out.

The script on a copy with a pin outside its macro
python3 lef_peek.py copy-E7.lef
  version 5.8  macros 2  pins 9  sites 1  layers 0  vias 0
  no problem found

The script never starts anything inside a file. We wrote it from our 63 copies and 168 public LEF files, so it knows the faults we tested and no others. It flagged 7 of the 168 public files. Six lack END LIBRARY and the seventh repeats 14 macro names.

Want the causes of an error? Go to the causes.

Is a LEF File Safe to Open and Share? Opening is safe, and sharing needs care

A LEF file is safe to open and needs care to share. Chip files describe cells and layers. Lenex files list athletes by name and birth date, and evidence files belong to the case. Work on copies, and send only what the other side needs.

Opening a LEF file in an editor is not the risk. The risk is what the file contains and who gets a copy. We scanned no file for malware, so we cannot say what a downloaded .lef file contains. We can say what every kind stores.

What every kind can contain

Cell and layer data Chip LEF files list the size, pins and shapes of cells. Treat kit files from the foundry or the customer as private until the owner says otherwise.
Athlete names and birth dates The Lenex 3.0 document lists birthdate, firstname, gender and lastname as required ATHLETE attributes. 4,701 of the 4,709 athletes in our samples have a birth date.
Evidence An EnCase logical evidence file belongs to a case. Keep the original read only and work on a copy.
The ZIP wrapper .lxf files are ZIP archives. Unzip them in a scratch folder, not in your working folders.

Swim files list children

Swim meets include young athletes. 27 of our 38 samples list athletes, 4,709 in total, with names, genders and birth dates. We counted attributes and read no name. 2,459 of the athletes also have a license value.

Do not post a Lenex file in a forum or a bug report. Cut the file down to a few invented athletes first. Entry lists, which Lenex also stores, name the same people.

Before you share a LEF file

  1. Name the kind with the first bytes.
  2. Ask who needs it. Bug reports for chip tools need one small macro, not the entire kit.
  3. Replace names and birth dates in Lenex files, and keep the original.
  4. Share an evidence file only with the people the case allows.
  5. Hash the file and send the hash on another channel, so the other side can check it.

Use a copy. Work on copies of LEF files, and write down their SHA256 hashes. Keep the original read only, so no tool can change it.

Why Will Your LEF File Not Load? Eight causes, and what to do about every one

LEF files fail to load for eight reasons. The LEF file can be another kind, and the encoding can be wrong. Semicolons and END lines can be missing, and numbers can be wrong. Keywords can be misspelled, the file can be cut and the reader can be the problem.

The table lists what we saw in our 63 copies and what the readers said. We tested three readers on Linux. Read every fix as the first step, not the final answer.

Eight causes of LEF files that will not load
Cause Details and fix
You have a different kind of file The ending .lef also names Lenex swim files and EnCase evidence files. KLayout loaded our Lenex file as an empty library with no message (copy 61), and lef21 refused it. Fix: Read the first bytes before you try another program.
The encoding or line endings are wrong CR only line endings stopped KLayout and lefdef (copy 2). A byte order mark stopped lefdef and lef21 (copy 3). UTF-16 stopped lef21 and gave lefdef an empty library (copy 4). Fix: Save the file as ASCII or UTF-8 with LF line endings and no byte order mark.
Semicolons are missing or have no space One missing semicolon stopped lefdef and lef21 (copy 10). One missing space before the semicolon stopped all three readers (copy 12). Fix: End every statement with a space and a semicolon.
An END line is missing or wrong Missing END lines for the pin or the port stopped all three readers (copies 18 and 19). The missing END UNITS did the same (copy 22). The wrong name after END stopped KLayout and lef21 (copy 17). Fix: Close every block with END and its own name, and end the file with END LIBRARY.
Numbers or RECTs are wrong Text in place of numbers (copy 32), RECTs with three or five numbers (copies 33 and 34) and decimal commas (copy 35) stopped all three readers. Fix: Use points for decimals and four numbers for every RECT.
The version, units or keywords are wrong KLayout loaded version 9.9 (copy 26), units of 0 (copy 30) and misspelled DIRECTION (copy 40). lefdef and lef21 stopped on all three. Fix: Check the spelling and the version against the Si2 reference, and read the file with a second reader.
The file is cut short or damaged Cuts at 25, 50, 75 and 90 percent stopped all three readers (copies 49 to 52). So did a cut inside a pin and eight random bytes. Deleting the last three lines still loaded in KLayout (copy 54). Fix: Compare the size and the hash with the source, and copy the file again.
The reader does not match the file lef21 stopped at 85 of our 168 public LEF files, including all 35 files with layers. KLayout and lefdef loaded all 85. lefdef ends the process after an error. Fix: Try a second reader before you call a file bad, and start lefdef in a child process.

Fix a LEF file in seven steps

  1. Copy the LEF file, write down its SHA256 hash and work on the copy.
  2. Read the first bytes and name the kind. Only chip LEF files start with VERSION or #.
  3. Read the full error message, and note the line number and the token it names. lefdef prints the file, the line and the token.
  4. Open the file at that line. Look at the statement above it for missing semicolons or missing END lines.
  5. Name the encoding with file file.lef. If it says UTF-16, CR or a byte order mark, save the file as UTF-8 with LF line endings.
  6. Read the file with the check script. It names faults the readers miss.
  7. Load the repaired copy in another reader, and compare the macro count with the script. If it still fails, copy the file again from its source and compare the hashes.

We did not test repairs on files from other people. LEF files that pass our script can still fail in your tool, and files that fail in the script can still load. Only your tool knows what it accepts.

What to send when you ask for help

If a forum or a support team asks about your LEF file, send these lines. They show what the file is and where the reader stopped, and they save rounds of questions.

A message that gets an answer
Subject: LEF file will not load
File: name, size in bytes and SHA256 hash
First bytes: the output of head -c 16 file.lef | xxd
Encoding: the output of file file.lef
Script: the output of lef_peek.py
Error: the full text of the message and the program that printed it
Tool: the program and its version
History: where the file came from and what changed

Not an error, but a question about similar files? Go to the versus part.

How Do You Convert a LEF File? LEF to GDS in KLayout, and what to do with the other two kinds

KLayout converts a chip LEF file to GDS in four lines of Python. A Lenex .lxf file unzips to Lenex XML. We tested no path for EnCase files, because we had no sample. A converter reads the file and writes a new one, and the original stays unchanged.

This part reports what we tested and what two vendor pages say. We read the pages named in every paragraph, and we used no Windows tool.

Chip LEF to GDS with KLayout

We read our intact LEF file in KLayout 0.30.12 and wrote the GDS file. The 1,581 byte LEF file became 1,270 bytes of GDS. Reading the GDS back gave 2 cells with the same names. The public file with 134 macros (320,370 bytes) became 308,050 bytes of GDS with 134 cells.

Four lines of Python from LEF to GDS
import klayout.db as db
layout = db.Layout()
layout.read("cells.lef")
layout.write("cells.gds")

Wikipedia on GDSII calls it a binary format for chip layout artwork, released by Calma in 1978. It says many vendors moved to the newer OASIS format from April 2008. We compared cell names and counts. We opened the shapes in no viewer.

Lenex to text

.lxf files are ZIP archives, and unzip -p writes the Lenex XML. The ZIP files in our samples were 11 percent of the XML size at the median. Python parsed all 38 samples as XML. We tested no converter from Lenex to spreadsheets.

EnCase evidence files

The Freeviewer page lists image export to JPEG, PNG, BMP, TIFF and GIF. It also lists batch conversion. The SysTools page lists previews of documents, images and metadata. We tested neither, because we found no sample file.

Conversions and how much we know
Task What we know
Chip LEF to GDS Tested in KLayout on 2 files. Cell names and counts matched after reading the GDS back.
Lenex .lxf to XML Tested with unzip and Python on 33 files. Every archive contained one .lef file.
Lenex XML to spreadsheets Not tested. We found no converter in our research.
EnCase file to files or images Described on two vendor pages. Not tested.

How Does a LEF File Differ From DEF, GDS and L01 Files? Cell library, circuit design, finished layout and evidence file

A chip LEF file lists cells and layers, and its partner DEF lists one circuit design. GDS stores the finished layout shapes in binary. An L01 file stores single files for EnCase, and Lenex stores swim meet data. Only the first two belong together.

People mix these types up because the endings look alike and the letters LEF name three of them. Chip LEF files and DEF files are partners. The others have nothing to do with chips, apart from GDS, which describes the same layout in another way.

LEF files next to similar files
Type What it is
Chip LEF Text. Cells, layers and vias for place and route tools. Wikipedia describes the format, and Si2 distributes it.
DEF The partner of LEF. It describes one circuit design, with its constraints, layout and netlist. The tiny DEF file saved as .lef stopped KLayout and lef21 (copy 63).
GDS Binary. Layout shapes for chip masks, from Calma in 1978. Wikipedia describes it. KLayout wrote ours from a LEF file.
L01 and Lx01 EnCase logical evidence files. PRONOM lists the L01 signature, and the forensics wiki lists Lx01.
Lenex .lef and .lxf XML swim meet data, and the same data in a ZIP archive. The Lenex 3.0 document defines both endings.

Similar endings cause other mix ups with LEF files. ELF files are Linux programs, covered in our ELF file guide. DWG files are CAD drawings, covered in our DWG file guide. DAT files have no fixed type, and our DAT file guide explains how to find out what the file is.

What Is the LEF File Format Made Of? The facts we could check, and where they came from

The LEF format is text built from blocks that close with END, and every statement ends with a space and a semicolon. The facts below come from Wikipedia, Si2, the Lenex document, PRONOM, the forensics wiki and our checks of 168 public LEF files and 63 damaged copies.

Facts about the LEF file formats
Part What we checked
Name Library Exchange Format, for chips. Files end in .lef. (Wikipedia)
Origin Developed by Aki Fujimura at Tangent Systems. Cadence bought the tools in 1989. (Wikipedia)
Distribution Si2, under the Apache-2.0 license. Versions 5.8 and 6.0 are listed, and a download needs a request form. (Si2)
Container ASCII text. Our file has 1,581 bytes and 109 lines. (Wikipedia, our file)
Statement end A space and a semicolon. All three readers refused the missing space. (our copy 12)
Blocks Every block opens with its name and closes with END and the same name. The file closes with END LIBRARY. (our file)
Comments Lines that start with #. 105 of 168 public LEF files have them. (our files)
Lenex endings The XML file is .lef and the common ZIP form is .lxf. (Lenex 3.0 document)
Lenex root An element named LENEX with a required version attribute. UTF-8 is recommended. (Lenex 3.0 document)
Lenex creator Christian Kaufmann, Switzerland. The document is dated 31 January 2015. (Lenex 3.0 document)
FileInfo type One type for .lef, a Lenex file, with Splash Meet Manager and any text editor. (FileInfo)
EnCase L01 Logical File Evidence Format. Signature 4C 56 46 09 0D 0A FF 00, added to PRONOM on 17 December 2015. (PRONOM)
EnCase segments .L01 to .L99, then .LAA. The format began in EnCase 5. (PRONOM)
EnCase Lx01 The second version, EWF2-LX01, with bzip2 compression and no encryption. (forensics wiki)
Our counts 168 public LEF files, 63 copies of one file, 38 Lenex files, four readers and a script.

About the values we list

Rules about chip LEF files come from our tests and from Wikipedia. Counts come from our own files. FileInfo and Wikipedia are directories, so we use them for names, history and programs.

Wikipedia cites the LEF and DEF Language Reference 5.7 from November 2009. Si2 lists 5.8 and 6.0. We did not download the reference, because Si2 asks for the request form and sends an expiring link.

What we left out

We damaged one chip LEF file that defines cells and has no layer blocks. We damaged no layer file, and we damaged no Lenex or EnCase file. The 168 public LEF files come from two open source projects, so files from commercial kits can differ.

We opened no LEF file in any place and route tool. We compared macro counts and not coordinates. We tested three readers on Linux, so Windows programs can behave in other ways.

We read the pages of two EnCase viewers and used neither. We found no public EnCase file. Our script checks the eight signature bytes against a stub we made.

Sources checked

For chips, see Library Exchange Format on Wikipedia, the Si2 page on LEF and DEF and GDSII on Wikipedia. For swim files, see the Lenex 3.0 technical documentation and the FileInfo page on LEF files.

For evidence files, see the PRONOM record for L01 and the forensics wiki page on EnCase images. The two Windows viewers are on the SysTools viewer page and the Freeviewer page. Every count came from files and scripts in our research folder.

Frequently Asked Questions About LEF Files

What is a LEF file?

A LEF file is a file that ends in .lef. Most are Library Exchange Format files, which are ASCII text that describes chip cells and layers. Others are Lenex files with swim meet data in XML. Two viewer makers also use the ending for EnCase evidence files, which EnCase stores as .L01.

How do I open a LEF file?

Read its first bytes to name the kind. Open chip LEF and Lenex .lef files in any text editor, and load a chip LEF file in KLayout. Unzip a .lxf file first. EnCase evidence files need EnCase or a forensic viewer. Save edited files as ASCII or UTF-8 with LF line endings.

How do I find which kind of LEF file I have?

Look at the first bytes. A chip LEF file starts with VERSION or a hash comment. A Lenex .lef file starts with the characters <?xml. A ZIP archive starts with PK, and its swim meet form is the .lxf file. EnCase files start with the bytes 4C 56 46. The file command helps for the first three.

Is a .lef file the same as an EnCase LEF file?

Two viewer makers say so, but EnCase names its logical evidence files .L01 and .Lx01. PRONOM and the forensics wiki use those names. We found no public sample, so we could not test a .lef file from EnCase. Check the first bytes before you trust the ending.

What is the difference between LEF and DEF?

LEF stores library data about cells, layers and vias. DEF stores the data for one circuit design, with its constraints, layout and netlist. They are partner formats from the same tools, and place and route tools read both. A DEF file saved as a .lef file stopped two of our three readers.

How do I convert a LEF file to GDS?

Load the LEF file in KLayout and write it as GDS. Four lines of Python do it with the klayout package. We converted our small LEF file and a public LEF file with 134 macros, and both gave the same cell names after we read the GDS back. We opened the shapes in no viewer.

What is an LXF file?

An LXF file is a ZIP archive with Lenex swim meet data. The Lenex 3.0 document says .lef is the XML file and .lxf is the common ZIP form. All 33 of our .lxf samples contained one .lef file. Unzip the archive to read the XML in any editor.

Why does my LEF file fail to load?

Eight causes cover what we found. The LEF file can be another kind, and the encoding can be wrong. Semicolons and END lines can be missing, and numbers can be wrong. Keywords can be misspelled, the file can be cut and the reader can be the problem. Try another reader before you call the file bad.

Does a LEF file need END LIBRARY?

Most have it. 162 of our 168 public chip LEF files end with END LIBRARY, and 6 do not. KLayout and lefdef loaded all 6, and lef21 stopped on all 6. Some readers need that line to finish.

Is a LEF file safe to share?

It depends on the kind. Chip LEF files can reveal cell designs from the kit. Lenex files list athletes by name and birth date. 4,701 of the 4,709 athletes in our samples have a birth date. Evidence files belong to a case. Share only what the other side needs.

Can I edit a LEF file in a text editor?

Yes. A LEF file is text, but watch the details. Keep every statement ending in a space and a semicolon. Keep the encoding ASCII or UTF-8 and the line endings LF. Close every block with END and its name. Our script can check the result before you load the file in a tool.

Why is a space needed before the semicolon in a LEF file?

The format ends a statement with a space and a semicolon. In our test, KLayout, lefdef and lef21 all refused a LEF file where we removed only that space. Write the space on every statement, and check the file with a script or a second reader.

Still Stuck With a LEF File? Two routes out, and where to look next

Your LEF file won’t load

Read the error line and follow the seven steps. The cause table lists what to try in order.

You do not know the kind

Read the first bytes table, and then start our script.

Is it a Linux program? An ELF file is an executable for Linux. Our page on ELF files covers it, and the versus part shows how the two differ.

Is it an EnCase disk image? An E01 file copies a drive for forensic work. Our page on E01 files covers it.

Is it a ZIP archive? An .lxf file opens with a ZIP tool. Our page on ZIP files covers the format.

Is the data unknown? Our page on DAT files covers files with no clear type, and the file extension resource library lists many more.

Is your type missing? Send it on the submit a file type page.