Alexander Afanasyev | 6ee98ff | 2018-02-13 19:12:28 -0500 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
Davide Pesavento | 07684bc | 2021-02-07 20:09:28 -0500 | [diff] [blame^] | 3 | * Copyright (c) 2012-2021 University of California, Los Angeles |
Alexander Afanasyev | 6ee98ff | 2018-02-13 19:12:28 -0500 | [diff] [blame] | 4 | * |
| 5 | * This file is part of ChronoSync, synchronization library for distributed realtime |
| 6 | * applications for NDN. |
| 7 | * |
| 8 | * ChronoSync is free software: you can redistribute it and/or modify it under the terms |
| 9 | * of the GNU General Public License as published by the Free Software Foundation, either |
| 10 | * version 3 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 13 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 | * PURPOSE. See the GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * ChronoSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
Davide Pesavento | 07684bc | 2021-02-07 20:09:28 -0500 | [diff] [blame^] | 20 | #ifndef CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP |
| 21 | #define CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP |
Alexander Afanasyev | 6ee98ff | 2018-02-13 19:12:28 -0500 | [diff] [blame] | 22 | |
| 23 | #include <ndn-cxx/encoding/buffer.hpp> |
| 24 | |
| 25 | namespace chronosync { |
| 26 | namespace bzip2 { |
| 27 | |
| 28 | /** |
| 29 | * @brief Compress @p buffer of size @p bufferSize with bzip2 |
| 30 | */ |
| 31 | std::shared_ptr<ndn::Buffer> |
| 32 | compress(const char* buffer, size_t bufferSize); |
| 33 | |
| 34 | /** |
| 35 | * @brief Decompress buffer @p buffer of size @p bufferSize with bzip2 |
| 36 | */ |
| 37 | std::shared_ptr<ndn::Buffer> |
| 38 | decompress(const char* buffer, size_t bufferSize); |
| 39 | |
| 40 | } // namespace bzip2 |
| 41 | } // namespace chronosync |
| 42 | |
Davide Pesavento | 07684bc | 2021-02-07 20:09:28 -0500 | [diff] [blame^] | 43 | #endif // CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP |