--- /dev/null
+! Copyright (C) 2009 Yun, Jonghyouk.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.syntax help.markup ;
+IN: io.encodings.blackhole
+
+ARTICLE: "io.encodings.blackhole" "yet another /dev/null in Factor encodings"
+"The " { $vocab-link "io.encodings.blackhole" } " vocab is yet another port of Un*x /dev/null special device file."
+{ $subsection blackhole }
+{
+ $see-also
+ "encodings-introduction"
+ "encode" "decode"
+ "file-reader" "file-writer"
+ "ascii" "binary"
+}
+;
+
+ABOUT: "io.encodings.blackhole"
+
+HELP: blackhole
+{ $class-description "blackhole encoding class specified to input/output encoding, it consume everything and produce nothing." }
+;
\ No newline at end of file
--- /dev/null
+! Copyright (C) 2009 Yun, Jonghyouk.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.encodings.blackhole io.encodings.string kernel tools.test ;
+IN: io.encodings.blackhole.tests
+
+[ t ] [ "foobar" blackhole encode B{ } = ] unit-test
+[ t ] [ "foobar" blackhole decode f = ] unit-test
--- /dev/null
+! Copyright (C) 2009 Yun, Jonghyouk.
+! See http://factorcode.org/license.txt for BSD license.
+USING: byte-arrays combinators io io.encodings kernel multiline ;
+IN: io.encodings.blackhole
+
+
+SINGLETON: blackhole
+
+<PRIVATE
+
+M: blackhole encode-char ( char stream encoding -- )
+ drop swap drop { } >byte-array swap stream-write ;
+
+M: blackhole decode-char ( stream encoding -- char/f )
+ drop stream-read1
+ {
+ { [ dup not ] [ drop f ] }
+ [ drop replacement-char ]
+ } cond ;
+
+
+PRIVATE>
\ No newline at end of file