include/lshkit/archive.h File Reference

A set of binary I/O routines. More...

#include <vector>
#include <iostream>

Go to the source code of this file.


namespace  lshkit


template<typename D>
std::ostream & lshkit::operator & (std::ostream &s, D &t)
template<typename D>
std::istream & lshkit::operator & (std::istream &s, D &t)
template<typename D>
std::ostream & lshkit::operator & (std::ostream &os, std::vector< D > &v)
template<typename D>
std::istream & lshkit::operator & (std::istream &is, std::vector< D > &v)

Detailed Description

A set of binary I/O routines.

The LSH library was originally designed to use boost serialization, but it turned out that boost serialization is too generalized and too slow for us. So we wrote our own minimal replacement.

You are not expected to use these routines unless you are implementing your own LSH class.

Given a variable V and a stream S, "S & V" will output V to S if S is derived from std::ostream, or load V from S if S is derived from std::istream. The operator is defined for the following types:

Note that binary I/O is architecture dependent and not portable.

Get LSHKIT at Fast, secure and Free Open Source software downloads doxygen