Progress® OpenEdge® Compilation Tools

Overview

The PLReader class was developed during my attempt to setup JUnit tests for PCT. I needed a way to check files were correctly added in archives with the PCTLibrary task.

Using an hex editor and the PROLIB utility, I tried to guess the structure of a PL file. A library is divided into 3 parts :

Header
Offset Size (in bytes) Description
0x00 2 Magic number : always 0xD707
0x02 20 Codepage used to store file names
0x16 8 Unknown
0x1E 4 Files list's offset

Each file in the files list is a sequence of bytes, which are described here :

Files list entry
Offset Size (in bytes) Description
0x00 1 Magic number : if 0xFF, it's a file entry, if 0xFE jump to the next 0xFF
0x01 1 Size of the file name (noted SZ)
0x02 SZ File name
0x02 + SZ 2 Unknown
0x04 + SZ 4 Offset of the beginning of the file content
0x08 + SZ 1 Unknown. Sometimes FF, sometimes 0A...
0x09 + SZ 4 File size (in bytes)
0x13 + SZ 4 Added to archive (in seconds since 1/1/1970)
0x17 + SZ 4 Modification timestamp (in seconds since 1/1/1970)
0x21 + SZ 8 Always 0x00000000