Esempio n. 1
0
void file_arg<Stream>::set_gzfile(std::string const& s, bool /*large_buf*/)
// gzstream has a static 256k buffer already. big enough. //TODO: what about USE_BOOST_GZSTREAM buffer?
{
  std::string fail_msg;
  try {
    call_set_new_gz<Stream>::bz2(*this, s);
  } catch (std::exception& e) {
    fail_msg.append("-exception: ").append(e.what());
    throw_fail(s, fail_msg);
  }
}
Esempio n. 2
0
void file_arg<Stream>::set_gzfile(std::string const& s, bool /*large_buf*/)
// gzstream has a static 256k buffer already. big enough.
{
  const bool read=stream_traits<Stream>::read;
  std::string fail_msg;
  try {
    if (read) {
      fail_msg=fail_in;
      set_new<igzstream>(s, fail_msg);
    } else {
      fail_msg=fail_out;
      set_new<ogzstream>(s, fail_msg);
    }
  } catch (std::exception &e) {
    fail_msg.append(" - exception: ").append(e.what());
    throw_fail(s, fail_msg);
  }
}