Add TagInputStream and TagOutputStream.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>