encoding: optimize BufferAppendDevice::write

Change-Id: Idc610856431fe0a160923e826f06cfd0a55f3ae2
Refs: #3727
diff --git a/src/encoding/buffer-stream.cpp b/src/encoding/buffer-stream.cpp
index 3fed843..ec501e6 100644
--- a/src/encoding/buffer-stream.cpp
+++ b/src/encoding/buffer-stream.cpp
@@ -32,7 +32,7 @@
 std::streamsize
 BufferAppendDevice::write(const char_type* s, std::streamsize n)
 {
-  std::copy(s, s + n, std::back_inserter(m_container));
+  m_container.insert(m_container.end(), s, s + n);
   return n;
 }