Added IdentityCodec (#17)

Added IdentityCodec

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5199609..f300a0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 2.1.0
+
+ * Added an `IdentityCodec<T>` which implements `Codec<T,T>` for use as default
+   value for in functions accepting an optional `Codec` as parameter.
+
 ## 2.0.2
 
 * Set max SDK version to `<3.0.0`, and adjust other dependencies.
diff --git a/lib/convert.dart b/lib/convert.dart
index ad543e9..d745856 100644
--- a/lib/convert.dart
+++ b/lib/convert.dart
@@ -7,5 +7,6 @@
 export 'src/accumulator_sink.dart';
 export 'src/byte_accumulator_sink.dart';
 export 'src/hex.dart';
+export 'src/identity_codec.dart';
 export 'src/percent.dart';
 export 'src/string_accumulator_sink.dart';
diff --git a/lib/src/identity_codec.dart b/lib/src/identity_codec.dart
new file mode 100644
index 0000000..1936481
--- /dev/null
+++ b/lib/src/identity_codec.dart
@@ -0,0 +1,28 @@
+import 'dart:convert';
+
+class _IdentityConverter<T> extends Converter<T, T> {
+  const _IdentityConverter();
+  T convert(T input) => input;
+}
+
+/// A [Codec] that performs the identity conversion (changing nothing) in both
+/// directions.
+///
+/// The identity codec passes input directly to output in both directions.
+/// This class can be used as a base when combining multiple codecs,
+/// because fusing the identity codec with any other codec gives the other
+/// codec back.
+///
+/// Note, that when fused with another [Codec] the identity codec disppears.
+class IdentityCodec<T> extends Codec<T, T> {
+  const IdentityCodec();
+
+  Converter<T, T> get decoder => _IdentityConverter<T>();
+  Converter<T, T> get encoder => _IdentityConverter<T>();
+
+  /// Fuse with an other codec.
+  ///
+  /// Fusing with the identify converter is a no-op, so this always return
+  /// [other].
+  Codec<T, R> fuse<R>(Codec<T, R> other) => other;
+}
diff --git a/pubspec.yaml b/pubspec.yaml
index d6bfdb4..f3a4d67 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: convert
-version: 2.0.2
+version: 2.1.0
 description: Utilities for converting between data representations.
 author: Dart Team <misc@dartlang.org>
 homepage: https://github.com/dart-lang/convert
diff --git a/test/identity_codec_test.dart b/test/identity_codec_test.dart
new file mode 100644
index 0000000..658027a
--- /dev/null
+++ b/test/identity_codec_test.dart
@@ -0,0 +1,23 @@
+import 'dart:convert';
+import 'package:convert/convert.dart';
+import 'package:test/test.dart';
+
+void main() {
+  group('IdentityCodec', () {
+    test('encode', () {
+      final codec = IdentityCodec<String>();
+      expect(codec.encode('hello-world'), equals('hello-world'));
+    });
+
+    test('decode', () {
+      final codec = IdentityCodec<String>();
+      expect(codec.decode('hello-world'), equals('hello-world'));
+    });
+
+    test('fuse', () {
+      final stringCodec = IdentityCodec<String>();
+      final utf8Strings = stringCodec.fuse(utf8);
+      expect(utf8Strings, equals(utf8));
+    });
+  });
+}