Note that there are some explanatory texts on larger screens.

plurals
  1. POTokyoCabinet's Ruby C interface can't bzip
    primarykey
    data
    text
    <p>I'm using the Ruby official Ruby C interface and am not able to bzip working. It did build with bzip support, ./configure said:</p> <pre><code>checking bzlib.h usability... yes checking bzlib.h presence... yes checking for bzlib.h... yes </code></pre> <p>So I wrote this example program that just writes an entry to two files, one supposedly bzip'd and one not. Neither is compressed; aside from the simple file size test at the end I can edit the with_bzip.tcb file and see the raw string text there.</p> <pre><code>require 'tokyocabinet' include TokyoCabinet def write filename, options File.unlink filename if File.exists? filename bdb = BDB::new bdb.tune(0, 0, 0, -1 -1, options) or raise "Couldn't tune" bdb.open(filename, BDB::OWRITER | BDB::OCREAT | BDB::OLCKNB) or raise "Couldn't open" bdb["test"] = "This string should be compressed and not appear raw.\n" * 10000 bdb.close end write 'without_bzip.tcb', 0 write 'with_bzip.tcb', BDB::TBZIP puts "Not actually compressed" unless File.size('with_bzip.tcb') &lt; File.size('without_bzip.tcb') </code></pre> <p>What makes it worse is that if I try a preview release of Oklahoma Mixer (example following - though I don't have the reputation to add the new tag), it compresses fine. When I tucked some debugging into its try() call, it seems to be making the same call to tune(0, 0, 0, -1, -1, 4). I'm pretty completely stumped - can anyone tell me what my code above is doing wrong?</p> <pre><code>require 'oklahoma_mixer' OklahomaMixer.open("minimal_om.tcb", :opts =&gt; 'lb') do |db| db["test"] = "This string should be compressed and not appear raw.\n" * 10000 end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload