added Isabelle_Process.input_bytes, which avoids the somewhat slow Standard_System.string_bytes (just in case someone wants to stream raw data at 250MB/s);
authorwenzelm
Fri, 13 Aug 2010 21:33:13 +0200
changeset 38372 e753f71b6b34
parent 38371 5b615a4a3a68
child 38373 e8197eea3cd0
added Isabelle_Process.input_bytes, which avoids the somewhat slow Standard_System.string_bytes (just in case someone wants to stream raw data at 250MB/s);
src/Pure/System/isabelle_process.scala
--- a/src/Pure/System/isabelle_process.scala	Fri Aug 13 21:30:10 2010 +0200
+++ b/src/Pure/System/isabelle_process.scala	Fri Aug 13 21:33:13 2010 +0200
@@ -373,8 +373,11 @@
 
   def input_raw(text: String): Unit = standard_input ! Input_Text(text)
 
+  def input_bytes(name: String, args: Array[Byte]*): Unit =
+    command_input ! Input_Chunks(Standard_System.string_bytes(name) :: args.toList)
+
   def input(name: String, args: String*): Unit =
-    command_input ! Input_Chunks((name :: args.toList).map(Standard_System.string_bytes))
+    input_bytes(name, args.map(Standard_System.string_bytes): _*)
 
   def close(): Unit = command_input ! Close
 }