spf-discuss
[Top] [All Lists]

Re: SRS: encoding with lengths instead of delimiters

2004-03-29 06:23:28

On Mar 29, 2004, at 3:42 AM, Shevek wrote:
Not only is it less readable for the user, but it is harder (impossible?) to parse using simple regular expressions. While not a requirement, most simple mail filtering programs are regular-expression based. Therefore the
current encoding has a slight advantage.

That's assuming you are using a scripting language. It's actually more work to use regexps in a compiled language than that propsed netstrings-like encoding. size+data is much easier and faster to parse in languages that don't support native regular expressions. Also I'd think that while it takes an extra line of code in a language like perl, it would still be faster.

// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth