DeCSS - Barblock Style
Lion J Templin

Well, I guess I can't send copies of this rare gem of programming utility around the world on the internet.  Oh true, you'll find it anywhere you go on the 'net, but sometimes you can't so easily get away with breaking the law.  Ah well, I still do a brisk trade of shipping objects back and forth between people.  So, why not distribute the code that way?

Enter one night playing with ZPL and one Zebra commercial label printer.  The result?  An encoded, bzip2'd version of the software so many corporate jerks don't want you to have.  Instead of sending the file over the oh-so-naughty internet, I'll send it on THREE 1"x3" STICKY LABELS.  Oh yeah, that's it.  Small enough to fit on a business size envelope (on the back), now everyone on my xmas card list gets the code.  My credit card companies get the code.  My insurance companies get the code.  My cable company, the municipal water company ... you get the idea.  Ok, so sure, not everyone has a 2D barblock reader, but in a pinch you know where you've got the code.

So how'd I do it?  The technical portion of the show is simple, really. A BARBLOCK is a "stacked barcode", which uses several rows of data in addition to the standard cross-read columns of your normal barcodes.  There are a few different types of barblocks, one of the most commonly used being a style called PDF417.  The size of the barblock is variable, but extended to it's maximum, a PDF417 barblock can hold over a K (1024 bytes) of data.  The PDF417 barblocks I used hold just over 1024 bytes.  Now, I needed to get the data I wanted.  I picked up a copy of the C file that does the work of the utility (css_descramble.c), included with it the necessary decrypt algs and keys.  Initally, I sent this raw out, resulting in NINE barblocks.  Bah,  so I bzip2'd the c file.  Now, PDF417 donna like some control catacters, and neither does ZPL (the language the printer speaks).  So, I simply wrote a little C program to escape the control characters AND enter the correct ZPL sequences for the reserved language characters.  You dont' need to know the ZPL sequences, the barblock will read them correctly.  But, you do need to know how I encoded the control characters.  I simply took anything below or equal to decimal 32 and replaced it with 32 and then 32 plus the value of the character.  Simple.  This simple alg is explained in very short terms in the beginning of the barblock sequence on label 1.

So, having put the ENCODING KEY TEXT plus the ENCODED DATA plus a NASTY MESSAGE TO THE POWERS THAT BE (I had some room left on label 3) together into a file, I simply 'split' them out to 3 files and dumped those portions of the data into the ZPL code to print the barblocks.

To read it, grab your 2D scanner, scan & capture all three labels in order, remove the ENCODING KEY TEXT from the beginning (first line), remove the NASTY MESSAGE from the end, decode the middle, and then unbzip2 the result.  Viola!  Share and enjoy ... the ZPL source file, send to any Zebra printer.