文章列表
Following code implements the same function as "tar cf - workspace |gzip -9 -c >1.tar.gz"
performance is also good.
#include <boost/iostreams/device/file.hpp>
#include <iostream>
#include <string>
#include <boost/iostreams/pipeline.hpp>
#include <boost/io ...
- 2009-04-25 15:05
- 浏览 2484
- 评论(0)
#include <sys/stat.h>
#include <fcntl.h>
#include <sstream>
#include <string>
#include <list>
#include <boost/iostreams/concepts.hpp>
#include <boost/filesystem.hpp>
#include <boost/iostreams/copy.hpp>
#include <boost/filesystem/exception.hpp ...
- 2009-09-18 04:28
- 浏览 1019
- 评论(0)
FILE* pf = popen("/bin/tar xf - ", "w");
if (pf != NULL) {
ifstream file(src_file, ios_base::in | ios_base::binary);
io::filtering_streambuf<input> in;
in.push(io::gzip_decompressor());
in.push(file);
io::fil ...
- 2009-09-18 04:23
- 浏览 695
- 评论(0)