boost-iostreams Questions

3

Solved

Can someone help me? I am trying to do something like the following: #include <boost/iostreams/tee.hpp> #include <boost/iostreams/stream.hpp> #include <sstream> #include <ca...
Vespiary asked 22/3, 2009 at 2:48

2

My problem is something like I want to append some string in front of a iostream. You can say in front of std::cin. #include <iostream> #include <string> void print(std::istream &...
Messuage asked 20/3, 2018 at 23:7

0

I wrote a code to read simple-text/bz2-compressed-file. I used magic-characters of bz2 file to detect the file is compressed or not NOTE "user may or may not provide file with proper extensio...
Yeung asked 8/3, 2018 at 20:59

1

Solved

I'm trying to build Boost C++ libraries version 1.65.1 on Windows with zlib support. I'm using zlib library from Conan package with zlib which I built previously. I'm trying to understand the right...
Shote asked 15/9, 2017 at 13:0

2

Solved

I'm given an std::istream that contains an UTF-16 encoded string. Imagine an UTF-16 encoded text file that has been opened like this: std::ifstream file( "mytext_utf16.txt", std::ios::bin...
Interstice asked 19/2, 2017 at 20:23

2

Solved

I want to write an array to a file, compressing it as I go. Later, I want to read the array from that file, decompressing it as I go. Boost's Iostreams seems like a good way to go, so I built the...
Eritrea asked 19/5, 2016 at 17:50

2

Solved

The Boost C++ library has Function Template tee The class templates tee_filter and tee_device provide two ways to split an output sequence so that all data is directed simultaneously to two dif...
Embarkation asked 16/6, 2009 at 0:29

1

Solved

I am pasting some code here which uses boost iostream to mmap & then writes to the mapped file: typedef unordered_map<int, string> work; int main() { work d; d[0] = "a"; boost::i...
Qulllon asked 5/5, 2014 at 8:38

1

Solved

I am very new to the memory mapping and trying to understand memory mapped files to use them in my project(linux based). My requirement is to write & then read from memory mapped files. I wrote...
Misprint asked 30/4, 2014 at 8:50

0

Can I write to boost::iostreams::stream from multiple threads without synchronization if my sink is thread-safe? class my_sink : boost::iostreams::sink { public: my_sink(param p) {} std::stream...
Wilone asked 20/12, 2013 at 22:26

2

Some basic questions about boost filtering_streams. I have dozens of functions that take a parameter of std::ofstream& void foo(std::ofstream& outStream) { // lots of operations, like thi...
Mechling asked 24/7, 2013 at 20:48

1

I use Boost::iostreams to write simultaneously to my console and a file. When i use eclipse to debug(with gdb of course), i receive a warning which says RTTI symbol not found for one of the classes...
Disjuncture asked 20/10, 2012 at 7:19

1

My project was using an older version of Boost's iostreams w/ bzip2. I'm now trying to upgrade to Boost 1.51. At first I did not compile with bzip so obviously I got the linker yelling about libboo...
Bellhop asked 18/10, 2012 at 8:44

2

Solved

In this simple example of Boost.Process 0.5 ( http://www.highscore.de/boost/process0.5/index.html) the output of a program (ls) is feeding a stream. The stream works fine but contrary to the expect...
Keeping asked 8/9, 2012 at 7:57

1

So normaly I do stuff like: std::ifstream stream; int buff_length = 8192; boost::shared_array<char> buffer( new char[buff_length]); stream.open( path.string().c_str(), std::ios_base::bin...
Pushover asked 26/4, 2012 at 14:11

2

I am reading a gzipped file using boost iostreams: The following works fine: namespace io = boost::iostreams; io::filtering_istream in; in.push(boost::iostreams::basic_gzip_decompressor<>...
Mulry asked 28/2, 2012 at 19:38

3

Solved

If I instantiate a mapped_file_source (boost 1.46.1 ) with a narrow character string as in the following I don't have a problem: boost::iostreams::mapped_file_source m_file_( "testfile.txt" ); H...

1

Solved

I implemented the gzip/zlib decompression of files as shown in their examples on the boost site. void CompressionUtils::Inflate(std::ifstream& inputFile, std::ofstream& outputFile) { boo...
Carnage asked 2/2, 2012 at 20:42

1

Solved

How do I build boost's iostreams library with gzip and bzip2 support?
Rousseau asked 2/9, 2011 at 11:18

1

I wrote a Logparser Application and now I want to implement decompression of .gz files. I tried it with boost::iostreams and zlib which seems to work, but I don't know how to handle the input I get...
Autonomy asked 28/3, 2011 at 16:19

2

Solved

I've been using the Boost serialization library, which is actually pretty nice, and lets me make simple wrappers to save my serializable objects to strings, like so: namespace bar = boost::archive...

2

Solved

I'm trying to convert the following bash code into C++ using boost::iostreams: #!/usr/bin/bash ( gzip -cd file1.ext.gz cat file2.ext ) | grep '^regex' # or sed 's/search/replace/' I can open a...
Arv asked 21/2, 2011 at 22:34

1

Recently, I spent some time working on getting boost version 1.44.0 built on windows with both iostreams support for both zlib & bzip2 compression filters. For a variety of reasons, it was deci...
Ladner asked 4/1, 2011 at 1:28

4

Solved

I use Boost.Serialization to serialize a std::map. The code looks like this void Dictionary::serialize(std::string & buffer) { try { std::stringstream ss; boost::archive::binary_oarchive ar...
Genethlialogy asked 14/9, 2010 at 12:29

2

I want to create a mapped binary file into memory; however I am not sure how to create the file to be mapped into the system. I read the documentation several times and realize there are 2 mapped f...
Complimentary asked 28/3, 2010 at 2:7

© 2022 - 2024 — McMap. All rights reserved.