diff --git a/CHANGELOG b/CHANGELOG
index 0251934..66f3e5f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,7 @@
 * Fix bug in getForwardingEntryFlags: Need to check all flags, not the first flag using "else if".
 
 Changes
+* http://redmine.named-data.net/issues/1085: In Name::Component, added comparison operators.
 * MetaInfo: Added setFinalBlockID for Name::Component, remove unused setFinalBlockID which take uint8_t*, etc.
 * Fix clang compiler warnings: Include headers, parentheses and cast explicitly.
 * Moved class ExcludeEntry to inner class Exclude::Entry.
diff --git a/include/ndn-cpp/name.hpp b/include/ndn-cpp/name.hpp
index 8c348fe..9a1b39e 100644
--- a/include/ndn-cpp/name.hpp
+++ b/include/ndn-cpp/name.hpp
@@ -167,7 +167,81 @@
      */
     static Component 
     fromNumberWithMarker(uint64_t number, uint8_t marker);
+
+    /**
+     * Check if this is the same component as other.
+     * @param other The other Component to compare with.
+     * @return true if the components are equal, otherwise false.
+     */
+    bool
+    equals(const Component& other) const
+    {
+      return *value_ == *other.value_;
+    }
+    
+    /**
+     * Check if this is the same component as other.
+     * @param other The other Component to compare with.
+     * @return true if the components are equal, otherwise false.
+     */
+    bool
+    operator == (const Component& other) const { return equals(other); }
+
+    /**
+     * Check if this is not the same component as other.
+     * @param other The other Component to compare with.
+     * @return true if the components are not equal, otherwise false.
+     */
+    bool
+    operator != (const Component& other) const { return !equals(other); }
+    
+    /**
+     * Compare this to the other Component using NDN canonical ordering.
+     * @param other The other Component to compare with.
+     * @return 0 If they compare equal, -1 if *this comes before other in the canonical ordering, or
+     * 1 if *this comes after other in the canonical ordering.
+     *
+     * @see http://named-data.net/doc/0.2/technical/CanonicalOrder.html
+     */
+    int
+    compare(const Component& other) const;
   
+    /**
+     * Return true if this is less than or equal to the other Component in the NDN canonical ordering.
+     * @param other The other Component to compare with.
+     *
+     * @see http://named-data.net/doc/0.2/technical/CanonicalOrder.html
+     */
+    bool
+    operator <= (const Component& other) const { return compare(other) <= 0; }
+  
+    /**
+     * Return true if this is less than the other Component in the NDN canonical ordering.
+     * @param other The other Component to compare with.
+     *
+     * @see http://named-data.net/doc/0.2/technical/CanonicalOrder.html
+     */
+    bool
+    operator < (const Component& other) const { return compare(other) < 0; }
+
+    /**
+     * Return true if this is less than or equal to the other Component in the NDN canonical ordering.
+     * @param other The other Component to compare with.
+     *
+     * @see http://named-data.net/doc/0.2/technical/CanonicalOrder.html
+     */
+    bool
+    operator >= (const Component& other) const { return compare(other) >= 0; }
+
+    /**
+     * Return true if this is greater than the other Component in the NDN canonical ordering.
+     * @param other The other Component to compare with.
+     *
+     * @see http://named-data.net/doc/0.2/technical/CanonicalOrder.html
+     */
+    bool
+    operator > (const Component& other) const { return compare(other) > 0; }
+
   private:
     Blob value_;
   }; 
diff --git a/src/name.cpp b/src/name.cpp
index 3d4519a..5012ca2 100644
--- a/src/name.cpp
+++ b/src/name.cpp
@@ -2,6 +2,7 @@
 /**
  * Copyright (C) 2013 Regents of the University of California.
  * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * @author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  * See COPYING for copyright and distribution information.
  */
 
@@ -10,6 +11,7 @@
 #include <string.h>
 #include <ndn-cpp/name.hpp>
 #include "c/name.h"
+#include "c/util/ndn_memory.h"
 
 using namespace std;
 using namespace ndn::ptr_lib;
@@ -174,6 +176,19 @@
   return ndn_NameComponent_toNumber(&componentStruct);
 }
 
+int
+Name::Component::compare(const Name::Component& other) const
+{
+  // Imitate ndn_Exclude_compareComponents.
+  if (value_.size() < other.value_.size())
+    return -1;
+  if (value_.size() > other.value_.size())
+    return 1;
+
+  // The components are equal length.  Just do a byte compare.  
+  return ndn_memcmp((uint8_t*)value_.buf(), (uint8_t*)other.value_.buf(), value_.size());
+}
+
 void 
 Name::set(const char *uri_cstr) 
 {
