diff --git a/PSync/detail/bloom-filter.hpp b/PSync/detail/bloom-filter.hpp
index 9aa4e6f..8ed7028 100644
--- a/PSync/detail/bloom-filter.hpp
+++ b/PSync/detail/bloom-filter.hpp
@@ -127,7 +127,7 @@
   friend std::ostream&
   operator<<(std::ostream& os, const BloomFilter& bf)
   {
-    ndn::printHex(os, bf.bit_table_.data(), bf.bit_table_.size(), false);
+    ndn::printHex(os, bf.bit_table_, false);
     return os;
   }
 
diff --git a/PSync/detail/iblt.cpp b/PSync/detail/iblt.cpp
index 28cae11..b62b893 100644
--- a/PSync/detail/iblt.cpp
+++ b/PSync/detail/iblt.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -158,7 +158,7 @@
   // If any buckets for one of the hash functions is not empty,
   // then we didn't peel them all:
   for (const auto& entry : peeled.m_hashTable) {
-    if (entry.isEmpty() != true) {
+    if (!entry.isEmpty()) {
       return false;
     }
   }
@@ -203,14 +203,14 @@
     std::memcpy(&table[(i * unitSize) + 8], &keyCheck, sizeof(keyCheck));
   }
 
-  auto compressed = compress(m_compressionScheme, table.data(), table.size());
+  auto compressed = compress(m_compressionScheme, table);
   name.append(ndn::name::Component(std::move(compressed)));
 }
 
 std::vector<uint32_t>
 IBLT::extractValueFromName(const ndn::name::Component& ibltName) const
 {
-  auto decompressedBuf = decompress(m_compressionScheme, ibltName.value(), ibltName.value_size());
+  auto decompressedBuf = decompress(m_compressionScheme, ibltName.value_bytes());
 
   if (decompressedBuf->size() % 4 != 0) {
     NDN_THROW(Error("Received IBF cannot be decompressed correctly!"));
diff --git a/PSync/detail/util.cpp b/PSync/detail/util.cpp
index 3e58d77..9a3e5cf 100644
--- a/PSync/detail/util.cpp
+++ b/PSync/detail/util.cpp
@@ -119,12 +119,12 @@
 uint32_t
 murmurHash3(uint32_t seed, const ndn::Name& name)
 {
-  auto wire = name.wireEncode();
+  const auto& wire = name.wireEncode();
   return murmurHash3(wire.value(), wire.value_size(), seed);
 }
 
 std::shared_ptr<ndn::Buffer>
-compress(CompressionScheme scheme, const uint8_t* buffer, size_t bufferSize)
+compress(CompressionScheme scheme, ndn::span<const uint8_t> buffer)
 {
   ndn::OBufferStream out;
   bio::filtering_streambuf<bio::input> in;
@@ -173,14 +173,14 @@
     case CompressionScheme::NONE:
       break;
   }
-  in.push(bio::array_source(reinterpret_cast<const char*>(buffer), bufferSize));
+  in.push(bio::array_source(reinterpret_cast<const char*>(buffer.data()), buffer.size()));
   bio::copy(in, out);
 
   return out.buf();
 }
 
 std::shared_ptr<ndn::Buffer>
-decompress(CompressionScheme scheme, const uint8_t* buffer, size_t bufferSize)
+decompress(CompressionScheme scheme, ndn::span<const uint8_t> buffer)
 {
   ndn::OBufferStream out;
   bio::filtering_streambuf<bio::input> in;
@@ -229,7 +229,7 @@
     case CompressionScheme::NONE:
       break;
   }
-  in.push(bio::array_source(reinterpret_cast<const char*>(buffer), bufferSize));
+  in.push(bio::array_source(reinterpret_cast<const char*>(buffer.data()), buffer.size()));
   bio::copy(in, out);
 
   return out.buf();
diff --git a/PSync/detail/util.hpp b/PSync/detail/util.hpp
index 9f6676d..cf405f8 100644
--- a/PSync/detail/util.hpp
+++ b/PSync/detail/util.hpp
@@ -23,8 +23,7 @@
 #include "PSync/common.hpp"
 
 #include <ndn-cxx/encoding/buffer.hpp>
-
-#include <string>
+#include <ndn-cxx/util/span.hpp>
 
 namespace psync {
 namespace detail {
@@ -45,10 +44,10 @@
 }
 
 std::shared_ptr<ndn::Buffer>
-compress(CompressionScheme scheme, const uint8_t* buffer, size_t bufferSize);
+compress(CompressionScheme scheme, ndn::span<const uint8_t> buffer);
 
 std::shared_ptr<ndn::Buffer>
-decompress(CompressionScheme scheme, const uint8_t* buffer, size_t bufferSize);
+decompress(CompressionScheme scheme, ndn::span<const uint8_t> buffer);
 
 } // namespace detail
 } // namespace psync
diff --git a/PSync/full-producer.cpp b/PSync/full-producer.cpp
index ca2ee5a..8e62a22 100644
--- a/PSync/full-producer.cpp
+++ b/PSync/full-producer.cpp
@@ -184,7 +184,7 @@
     // Send all data if greater then threshold, else send positive below as usual
     // Or send if we can't get neither positive nor negative differences
     if (positive.size() + negative.size() >= m_threshold ||
-        (positive.size() == 0 && negative.size() == 0)) {
+        (positive.empty() && negative.empty())) {
       detail::State state;
       for (const auto& content : m_prefixes) {
         if (content.second != 0) {
@@ -245,7 +245,7 @@
   // TODO: Remove appending of hash - serves no purpose to the receiver
   ndn::Name dataName(ndn::Name(name).appendNumber(std::hash<ndn::Name>{}(nameWithIblt)));
 
-  auto content = detail::compress(m_contentCompression, block.wire(), block.size());
+  auto content = detail::compress(m_contentCompression, block);
 
   // checking if our own interest got satisfied
   if (m_outstandingInterestName == name) {
@@ -278,7 +278,7 @@
 
   detail::State state;
   try {
-    auto decompressed = detail::decompress(m_contentCompression, bufferPtr->data(), bufferPtr->size());
+    auto decompressed = detail::decompress(m_contentCompression, *bufferPtr);
     state.wireDecode(ndn::Block(std::move(decompressed)));
   }
   catch (const std::exception& e) {
@@ -330,7 +330,7 @@
     if (!diff.listEntries(positive, negative)) {
       NDN_LOG_TRACE("Decode failed for pending interest");
       if (positive.size() + negative.size() >= m_threshold ||
-          (positive.size() == 0 && negative.size() == 0)) {
+          (positive.empty() && negative.empty())) {
         NDN_LOG_TRACE("pos + neg > threshold or no diff can be found, erase pending interest");
         it = m_pendingEntries.erase(it);
         continue;
diff --git a/PSync/segment-publisher.cpp b/PSync/segment-publisher.cpp
index 1bdc981..5d42b88 100644
--- a/PSync/segment-publisher.cpp
+++ b/PSync/segment-publisher.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -36,7 +36,7 @@
                           const ndn::Block& block, ndn::time::milliseconds freshness,
                           const ndn::security::SigningInfo& signingInfo)
 {
-  auto buf = std::make_shared<const ndn::Buffer>(block.wire(), block.size());
+  auto buf = std::make_shared<const ndn::Buffer>(block.begin(), block.end());
   publish(interestName, dataName, buf, freshness, signingInfo);
 }
 
@@ -55,8 +55,7 @@
   const uint8_t* segmentBegin = rawBuffer;
   const uint8_t* end = rawBuffer + buffer->size();
 
-  size_t maxPacketSize = (ndn::MAX_NDN_PACKET_SIZE >> 1);
-
+  const size_t maxPacketSize = ndn::MAX_NDN_PACKET_SIZE >> 1;
   uint64_t totalSegments = buffer->size() / maxPacketSize;
 
   ndn::Name segmentPrefix(dataName);
@@ -74,14 +73,14 @@
 
     // We get a std::exception: bad_weak_ptr from m_ims if we don't use shared_ptr for data
     auto data = std::make_shared<ndn::Data>(segmentName);
-    data->setContent(segmentBegin, segmentEnd - segmentBegin);
+    data->setContent(ndn::span<const uint8_t>(segmentBegin, segmentEnd));
     data->setFreshnessPeriod(freshness);
     data->setFinalBlock(ndn::name::Component::fromSegment(totalSegments));
 
-    segmentBegin = segmentEnd;
-
     m_keyChain.sign(*data, signingInfo);
 
+    segmentBegin = segmentEnd;
+
     // Put on face only the segment which has a pending interest
     // otherwise the segment is unsolicited
     if (interestSegment == segmentNo) {
@@ -99,7 +98,6 @@
 SegmentPublisher::replyFromStore(const ndn::Name& interestName)
 {
   auto it = m_ims.find(interestName);
-
   if (it != nullptr) {
     m_face.put(*it);
     return true;
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index f2c4a13..1ea3119 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -80,7 +80,7 @@
   BOOST_CHECK_NO_THROW(node.onSyncData(syncInterest, badCompress));
 
   const uint8_t test[] = {'t', 'e', 's', 't'};
-  auto goodCompressBadBlock = detail::compress(node.m_contentCompression, test, sizeof(test));
+  auto goodCompressBadBlock = detail::compress(node.m_contentCompression, test);
   BOOST_CHECK_NO_THROW(node.onSyncData(syncInterest, goodCompressBadBlock));
 }
 
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index 8aa9c8e..d3d9e03 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -476,7 +476,7 @@
     state.addContent(Name(prefixToPublish).appendNumber(nodes[0]->m_prefixes[prefixToPublish]));
 
     auto block = state.wireEncode();
-    compressed = detail::compress(nodes[0]->m_contentCompression, block.wire(), block.size());
+    compressed = detail::compress(nodes[0]->m_contentCompression, block);
   } while (compressed->size() < (ndn::MAX_NDN_PACKET_SIZE >> 1));
 
   advanceClocks(10_ms, 100);
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index b2f4d3e..1f00564 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -97,9 +97,8 @@
 
   Name malformedName("/test");
   auto compressed = compress(CompressionScheme::DEFAULT,
-                             malformedName.wireEncode().value(),
-                             malformedName.wireEncode().value_size());
-  malformedName.append(compressed->data(), compressed->size());
+                             malformedName.wireEncode().value_bytes());
+  malformedName.append(name::Component(std::move(compressed)));
   IBLT rcvd2(size, CompressionScheme::DEFAULT);
   BOOST_CHECK_THROW(rcvd2.initialize(malformedName.at(-1)), IBLT::Error);
 }
diff --git a/tests/test-util.cpp b/tests/test-util.cpp
index e37957a..8020fe4 100644
--- a/tests/test-util.cpp
+++ b/tests/test-util.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -56,14 +56,14 @@
   const uint8_t uncompressed[] = {'t', 'e', 's', 't'};
 
   for (const auto& s : supported) {
-    BOOST_CHECK_NO_THROW(compress(s, uncompressed, sizeof(uncompressed)));
-    auto compressed = compress(s, uncompressed, sizeof(uncompressed));
-    BOOST_CHECK_NO_THROW(decompress(s, compressed->data(), compressed->size()));
+    BOOST_CHECK_NO_THROW(compress(s, uncompressed));
+    auto compressed = compress(s, uncompressed);
+    BOOST_CHECK_NO_THROW(decompress(s, *compressed));
   }
 
   for (const auto& s : notSupported) {
-    BOOST_CHECK_THROW(compress(s, uncompressed, sizeof(uncompressed)), CompressionError);
-    BOOST_CHECK_THROW(decompress(s, uncompressed, sizeof(uncompressed)), CompressionError);
+    BOOST_CHECK_THROW(compress(s, uncompressed), CompressionError);
+    BOOST_CHECK_THROW(decompress(s, uncompressed), CompressionError);
   }
 }
 
