compressing tables

geoff on 2003-08-21T14:00:52

I've started the largish task of sync'ing APR with the APR:: classes in mod_perl 2.0. in trying to get comfortable with the code I started with something easy, apr_table_compress.

say you have a table like

 [ sail => 'spinnaker',
   sail => 'jib',
   sail => 'blooper' ]


if you issue $table->compress(APR::OVERLAP_TABLES_SET) the table will be flattened into

 [ sail => 'blooper' ]

$table->compress(APR::OVERLAP_TABLES_MERGE) will produce

 [ sail => 'spinnaker, jib, blooper' ]

I'm not sure how useful that really is, but it's there in APR so it might as well be exposed.

if you build it, they will come.