client/cpp/rappor_sim.cc
// Print a report, with the most significant bit first.
Print a report, with the most significant bit first.
Print a report with the most significant bit first .
void PrintBitString(const std::string& s) {
  for (int i = s.size() - 1; i >= 0; --i) {
    unsigned char byte = s[i];
    for (int j = 7; j >= 0; --j) {
      bool bit = byte & (1 << j);
      std::cout << (bit ? "1" : "0");
    }
  }
}
void PrintBitString ( const std :: string & s ) { for ( int i = s . size ( ) - 1 ; i >= 0 ; -- i ) { unsigned char byte = s [ i ] ; for ( int j = 7 ; j >= 0 ; -- j ) { bool bit = byte & ( 1 << j ) ; std :: cout << ( bit ? " " : " " ) ; } } }
Print a report, with the most significant bit first.
Print a report with the most significant bit first .