我有一个Stream的项目(u32, Bytes)其中整数是在范围内的索引0..n我想将此流拆分为n流,基本上过滤由整数。 我考虑了几种可能性,其中包括 创建n流的每一个偷窥在底层的流来确定下一个项目是为它 推动项目n的一个水池,当他们到达,然后再次将接收器的另一侧用作流。 (这似乎与 Forwarding from a futures::Stream to a futures::Sink有关。)
我通过运行几个外部的Unix工具在PDF文件中写入一个临时文件(基本上我使用QPDF和sed改变颜色值不要问。): // Uncompress PDF using QPDF (doesn't read from stdin, so needs tempfile.)
$compressed_file_path = tempnam(sys_get_temp_dir(), 'cruciverbal')