diff --git a/PSync/detail/iblt.hpp b/PSync/detail/iblt.hpp
index d51612c..d3d023f 100644
--- a/PSync/detail/iblt.hpp
+++ b/PSync/detail/iblt.hpp
@@ -95,7 +95,7 @@
    * @param scheme compression scheme to be used for the IBLT
    */
   explicit
-  IBLT(size_t expectedNumEntries, CompressionScheme scheme = CompressionScheme::ZLIB);
+  IBLT(size_t expectedNumEntries, CompressionScheme scheme);
 
   /**
    * @brief Populate the hash table using the vector representation of IBLT
diff --git a/PSync/detail/state.cpp b/PSync/detail/state.cpp
index 850115f..0a5242c 100644
--- a/PSync/detail/state.cpp
+++ b/PSync/detail/state.cpp
@@ -31,6 +31,7 @@
 void
 State::addContent(const ndn::Name& prefix)
 {
+  m_wire.reset();
   m_content.emplace_back(prefix);
 }
 
@@ -79,6 +80,8 @@
                                           ndn::to_string(blockType)));
   }
 
+  m_content.clear();
+
   wire.parse();
   m_wire = wire;
 
diff --git a/PSync/detail/util.cpp b/PSync/detail/util.cpp
index 7e546fc..c622ecd 100644
--- a/PSync/detail/util.cpp
+++ b/PSync/detail/util.cpp
@@ -22,7 +22,6 @@
  **/
 
 #include "PSync/detail/util.hpp"
-#include "PSync/detail/config.hpp"
 
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 #include <ndn-cxx/util/backports.hpp>
diff --git a/PSync/detail/util.hpp b/PSync/detail/util.hpp
index 4da380b..b160cd3 100644
--- a/PSync/detail/util.hpp
+++ b/PSync/detail/util.hpp
@@ -24,6 +24,8 @@
 #ifndef PSYNC_UTIL_HPP
 #define PSYNC_UTIL_HPP
 
+#include "PSync/detail/config.hpp"
+
 #include <ndn-cxx/name.hpp>
 
 #include <inttypes.h>
@@ -54,7 +56,12 @@
   GZIP,
   BZIP2,
   LZMA,
-  ZSTD
+  ZSTD,
+#ifdef PSYNC_HAVE_ZLIB
+  DEFAULT = ZLIB
+#else
+  DEFAULT = NONE
+#endif
 };
 
 std::shared_ptr<ndn::Buffer>
diff --git a/PSync/full-producer.cpp b/PSync/full-producer.cpp
index ef0770a..31ef4a2 100644
--- a/PSync/full-producer.cpp
+++ b/PSync/full-producer.cpp
@@ -158,7 +158,7 @@
   NDN_LOG_DEBUG("Full Sync Interest Received, nonce: " << interest.getNonce() <<
                 ", hash: " << std::hash<ndn::Name>{}(interestName));
 
-  IBLT iblt(m_expectedNumEntries);
+  IBLT iblt(m_expectedNumEntries, m_ibltCompression);
   try {
     iblt.initialize(ibltName);
   }
diff --git a/PSync/full-producer.hpp b/PSync/full-producer.hpp
index 720e256..ffbdc77 100644
--- a/PSync/full-producer.hpp
+++ b/PSync/full-producer.hpp
@@ -82,8 +82,8 @@
                const UpdateCallback& onUpdateCallBack,
                ndn::time::milliseconds syncInterestLifetime = SYNC_INTEREST_LIFTIME,
                ndn::time::milliseconds syncReplyFreshness = SYNC_REPLY_FRESHNESS,
-               CompressionScheme ibltCompression = CompressionScheme::ZLIB,
-               CompressionScheme contentCompression = CompressionScheme::ZLIB);
+               CompressionScheme ibltCompression = CompressionScheme::DEFAULT,
+               CompressionScheme contentCompression = CompressionScheme::DEFAULT);
 
   ~FullProducer();
 
diff --git a/PSync/producer-base.hpp b/PSync/producer-base.hpp
index 510546e..29a1c04 100644
--- a/PSync/producer-base.hpp
+++ b/PSync/producer-base.hpp
@@ -75,8 +75,8 @@
                const ndn::Name& syncPrefix,
                const ndn::Name& userPrefix,
                ndn::time::milliseconds syncReplyFreshness = SYNC_REPLY_FRESHNESS,
-               CompressionScheme ibltCompression = CompressionScheme::ZLIB,
-               CompressionScheme contentCompression = CompressionScheme::ZLIB);
+               CompressionScheme ibltCompression = CompressionScheme::NONE,
+               CompressionScheme contentCompression = CompressionScheme::NONE);
 public:
   /**
    * @brief Returns the current sequence number of the given prefix
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index 34bef0c..1f5c6bb 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -398,16 +398,26 @@
 {
   addNode(0);
 
-  for (int i = 0; i < 2000; i++) {
-    Name prefixToPublish("userNode0-" + to_string(i));
+  int i = 0;
+  State state;
+
+  std::shared_ptr<ndn::Buffer> compressed;
+  do {
+    Name prefixToPublish("userNode0-" + to_string(i++));
     nodes[0]->addUserNode(prefixToPublish);
     nodes[0]->publishName(prefixToPublish);
-  }
+
+    state.addContent(ndn::Name(prefixToPublish).appendNumber(nodes[0]->m_prefixes[prefixToPublish]));
+
+    auto block = state.wireEncode();
+    compressed = compress(nodes[0]->m_contentCompression, block.wire(), block.size());
+
+  } while (compressed->size() < (ndn::MAX_NDN_PACKET_SIZE >> 1));
 
   advanceClocks(ndn::time::milliseconds(10), 100);
 
   Name syncInterestName(syncPrefix);
-  IBLT iblt(40);
+  IBLT iblt(40, nodes[0]->m_ibltCompression);
   iblt.appendToName(syncInterestName);
 
   nodes[0]->onSyncInterest(syncPrefix, Interest(syncInterestName));
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index 5be1d80..e99bf6e 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -34,8 +34,8 @@
 {
   int size = 10;
 
-  IBLT iblt1(size);
-  IBLT iblt2(size);
+  IBLT iblt1(size, CompressionScheme::DEFAULT);
+  IBLT iblt2(size, CompressionScheme::DEFAULT);
   BOOST_CHECK_EQUAL(iblt1, iblt2);
 
   std::string prefix = Name("/test/memphis").appendNumber(1).toUri();
@@ -55,7 +55,7 @@
 {
   int size = 10;
 
-  IBLT iblt(size);
+  IBLT iblt(size, CompressionScheme::DEFAULT);
   std::string prefix = Name("/test/memphis").appendNumber(1).toUri();
   uint32_t newHash = murmurHash3(11, prefix);
   iblt.insert(newHash);
@@ -63,12 +63,12 @@
   Name ibltName("sync");
   iblt.appendToName(ibltName);
 
-  IBLT rcvd(size);
+  IBLT rcvd(size, CompressionScheme::DEFAULT);
   rcvd.initialize(ibltName.get(-1));
 
   BOOST_CHECK_EQUAL(iblt, rcvd);
 
-  IBLT rcvdDiffSize(20);
+  IBLT rcvdDiffSize(20, CompressionScheme::DEFAULT);
   BOOST_CHECK_THROW(rcvdDiffSize.initialize(ibltName.get(-1)), std::runtime_error);
 }
 
@@ -76,7 +76,7 @@
 {
   int size = 10;
 
-  IBLT iblt1(size);
+  IBLT iblt1(size, CompressionScheme::DEFAULT);
 
   std::string prefix = Name("/test/memphis").appendNumber(1).toUri();
   uint32_t hash1 = murmurHash3(11, prefix);
@@ -105,8 +105,8 @@
   // Relevant to full sync case
   int size = 10;
 
-  IBLT ownIBF(size);
-  IBLT rcvdIBF(size);
+  IBLT ownIBF(size, CompressionScheme::DEFAULT);
+  IBLT rcvdIBF(size, CompressionScheme::DEFAULT);
 
   std::string prefix = Name("/test/memphis").appendNumber(3).toUri();
   uint32_t hash1 = murmurHash3(11, prefix);
@@ -129,7 +129,7 @@
 {
   int size = 10;
 
-  IBLT ownIBF(size);
+  IBLT ownIBF(size, CompressionScheme::DEFAULT);
 
   IBLT rcvdIBF = ownIBF;
 
@@ -169,7 +169,7 @@
 
   int size = 10;
 
-  IBLT ownIBF(size);
+  IBLT ownIBF(size, CompressionScheme::DEFAULT);
 
   for (int i = 0; i < 50; i++) {
     std::string prefix = Name("/test/memphis" + std::to_string(i)).appendNumber(1).toUri();
diff --git a/tests/test-state.cpp b/tests/test-state.cpp
index 25626c4..6d7239c 100644
--- a/tests/test-state.cpp
+++ b/tests/test-state.cpp
@@ -74,6 +74,20 @@
   BOOST_CHECK_EQUAL(state2.getContent().size(), 0);
 }
 
+BOOST_AUTO_TEST_CASE(ReEncode)
+{
+  State state;
+  state.addContent(ndn::Name("test1"));
+  state.addContent(ndn::Name("test2"));
+
+  state.wireEncode();
+
+  state.addContent(ndn::Name("test3"));
+
+  State state2(state.wireEncode());
+  BOOST_CHECK_EQUAL(state2.getContent().size(), 3);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace psync
\ No newline at end of file
