diff --git a/src/util/io.cpp b/src/util/io.cpp
new file mode 100644
index 0000000..84db1e4
--- /dev/null
+++ b/src/util/io.cpp
@@ -0,0 +1,88 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2016 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "io.hpp"
+#include "../encoding/buffer-stream.hpp"
+#include "../security/transform.hpp"
+
+namespace ndn {
+namespace io {
+
+optional<Block>
+loadBlock(std::istream& is, IoEncoding encoding)
+{
+  namespace t = ndn::security::transform;
+
+  OBufferStream os;
+  try {
+    switch (encoding) {
+      case NO_ENCODING:
+        t::streamSource(is) >> t::streamSink(os);
+        break;
+      case BASE_64:
+        t::streamSource(is) >> t::base64Decode() >> t::streamSink(os);
+        break;
+      case HEX:
+        t::streamSource(is) >> t::hexDecode() >> t::streamSink(os);
+        break;
+      default:
+        return nullopt;
+    }
+  }
+  catch (const t::Error&) {
+    return nullopt;
+  }
+
+  try {
+    return make_optional<Block>(os.buf());
+  }
+  catch (const tlv::Error&) {
+    return nullopt;
+  }
+}
+
+void
+saveBlock(const Block& block, std::ostream& os, IoEncoding encoding)
+{
+  namespace t = ndn::security::transform;
+
+  try {
+    switch (encoding) {
+      case NO_ENCODING:
+        t::bufferSource(block.wire(), block.size()) >> t::streamSink(os);
+        break;
+      case BASE_64:
+        t::bufferSource(block.wire(), block.size()) >> t::base64Encode() >> t::streamSink(os);
+        break;
+      case HEX:
+        t::bufferSource(block.wire(), block.size()) >> t::hexEncode(true) >> t::streamSink(os);
+        break;
+      default:
+        BOOST_THROW_EXCEPTION(Error("unrecognized IoEncoding"));
+    }
+  }
+  catch (const t::Error& e) {
+    BOOST_THROW_EXCEPTION(Error(e.what()));
+  }
+}
+
+} // namespace io
+} // namespace ndn
diff --git a/src/util/io.hpp b/src/util/io.hpp
index 7af2a9e..a169113 100644
--- a/src/util/io.hpp
+++ b/src/util/io.hpp
@@ -23,8 +23,6 @@
 #define NDN_UTIL_IO_HPP
 
 #include "../encoding/block.hpp"
-#include "../encoding/buffer-stream.hpp"
-#include "../security/transform.hpp"
 
 #include <iostream>
 #include <fstream>
@@ -50,6 +48,13 @@
   HEX ///< uppercase hexadecimal encoding
 };
 
+/** \brief loads a TLV block from a stream
+ *  \return if success, the Block and true
+ *          otherwise, a default-constructed Block and false
+ */
+optional<Block>
+loadBlock(std::istream& is, IoEncoding encoding = BASE_64);
+
 /** \brief loads a TLV element from a stream
  *  \tparam T type of TLV element; T must be WireDecodable,
  *            and must have a Error nested type
@@ -59,30 +64,14 @@
 shared_ptr<T>
 load(std::istream& is, IoEncoding encoding = BASE_64)
 {
-  OBufferStream os;
-  try {
-    namespace t = ndn::security::transform;
-    switch (encoding) {
-      case NO_ENCODING:
-        t::streamSource(is) >> t::streamSink(os);
-        break;
-      case BASE_64:
-        t::streamSource(is) >> t::base64Decode() >> t::streamSink(os);
-        break;
-      case HEX:
-        t::streamSource(is) >> t::hexDecode() >> t::streamSink(os);
-        break;
-      default:
-        return nullptr;
-    }
-  }
-  catch (const ndn::security::transform::Error&) {
+  optional<Block> block = loadBlock(is, encoding);
+  if (!block) {
     return nullptr;
   }
 
   try {
     auto obj = make_shared<T>();
-    obj->wireDecode(Block(os.buf()));
+    obj->wireDecode(*block);
     return obj;
   }
   catch (const typename T::Error& e) {
@@ -103,6 +92,12 @@
   return load<T>(is, encoding);
 }
 
+/** \brief saves a TLV block to a stream
+ *  \throw Error error during saving
+ */
+void
+saveBlock(const Block& block, std::ostream& os, IoEncoding encoding = BASE_64);
+
 /** \brief saves a TLV element to a stream
  *  \tparam T type of TLV element; T must be WireEncodable,
  *            and must have a Error nested type
@@ -123,25 +118,7 @@
     BOOST_THROW_EXCEPTION(Error(e.what()));
   }
 
-  try {
-    namespace t = ndn::security::transform;
-    switch (encoding) {
-      case NO_ENCODING:
-        t::bufferSource(block.wire(), block.size()) >> t::streamSink(os);
-        break;
-      case BASE_64:
-        t::bufferSource(block.wire(), block.size()) >> t::base64Encode() >> t::streamSink(os);
-        break;
-      case HEX:
-        t::bufferSource(block.wire(), block.size()) >> t::hexEncode(true) >> t::streamSink(os);
-        break;
-      default:
-        BOOST_THROW_EXCEPTION(Error("unrecognized IoEncoding"));
-    }
-  }
-  catch (const ndn::security::transform::Error& e) {
-    BOOST_THROW_EXCEPTION(Error(e.what()));
-  }
+  saveBlock(block, os, encoding);
 }
 
 /** \brief saves a TLV element to a file
