The SFV File Format

SFV files are plain ASCII textfiles. Basically there are only two types of lines: comment lines and lines containing a filename with its CRC32 checksum.

Comment lines begin with a semicolor: “;” . For example:

; This is a comment line

Usually comments are seperated from the leading “;” by a single blank character (ascii code 32 (=20hex)), this, however, is a design issue and not a technical necessity. 

The very first line of a SFV file usually is a special comment line: the “generated by” message. It basically looks like this:

; Generated by pdSFV v1.2 (WIN) on 2000-03-19 at 15:30.07

The date format is YYYY-MM-DD and the time format is HH:MM.SS . You will figure out that current versions of WIN-SFV and SFV*NIX cannot process SFV files which don’t have

; Generated by WIN-SFV v1

(or the unix version string) as beginning of their “generated by” – line. Thus, what pdSFV is doing in WIN-SFV compatibility is simply pretending that it is WIN-SFV by faking this line.

If files’ date and time stamps are added to the SFV file, there is an established format as well:

;     15000000  10:09.40 2000-03-14 dummy1.r00
1234567890123456789012345678901234567
         1         2         3

Especially notice the double-space between file size and time field. Time and date formats are as described above. In other words: file size ends at column 14, time starts at 17, date at 26, filename at 37.

The non-comment lines contain a filename and – seperated by a single blank – the (full 8 digits, with leading zeroes if necessary) hexadecimal value of the file’s CRC32. For example:

dummy1.r00 22C42BCB

If you are interested in how the CRC32 checksum is calculated, you should have a look at pdSFV’s source code. Also feel free to use this (as well as any other) part of pdSFV’s source for projects of your own, that’s what it is made for.

User comments like banner files, group logos etc. are added as regular comments. Usually those banners are preceeded by a “;!SFV_COMMENT_START” line and terminated by a “;!SFV_COMMENT_END” line, however not everyone is doing so yet.


Just mentioned for completeness: a SFV file doesn’t have to contain any comment lines. A simple list of files and their CRCs will do as well. (see next section if you want to go into the details that have caused some trouble on “scene” sites because of that)