/usr/include/zmqpp/z85.hpp is in libzmqpp-dev 4.1.2-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file is part of zmqpp.
* Copyright (c) 2011-2015 Contributors as noted in the AUTHORS file.
*/
#pragma once
#include <string>
#include <vector>
#include <zmq.h>
namespace zmqpp
{
#if (ZMQ_VERSION_MAJOR >= 4)
/**
* Provide z85 encoding and decoding facilities.
*/
namespace z85
{
/**
* Encode a binary string into a string using Z85 representation.
* @param raw_data the binary string to be encoded.
* @return the encoded string.
* See ZMQ RFC 32;
*/
std::string encode(const std::string &raw_data);
/**
* Encode a binary blob into a string using Z85 representation.
* @param data pointer to raw data to be encoded.
* @param size the size of the data to be encoded.
* @return the encoded string.
* See ZMQ RFC 32;
*/
std::string encode(const uint8_t *data, size_t size);
/**
* Decode a Z85 encoded string into a binary blob represented as a vector.
* @param string the string to be decoded.
* @return a vector of uint8_t: the binary block after string decoding.
*/
std::vector<uint8_t> decode(const std::string &string);
}
#endif
}
|