# Io\_splice 2.0.0 - IO::Splice.copy\_stream added!

**URL:** <https://www.ruby-forum.com/t/io-splice-2-0-0-io-splice-copy-stream-added/189692>\
**Category:** Ruby\
**Created:** [June 5, 2010, 10:54am UTC](https://www.ruby-forum.com/t/io-splice-2-0-0-io-splice-copy-stream-added/189692 "2010-06-05T10:54:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [June 5, 2010, 10:54am UTC](https://www.ruby-forum.com/t/io-splice-2-0-0-io-splice-copy-stream-added/189692/1 "2010-06-05T10:54:46Z")

</div>

The splice family of Linux system calls can transfer data between file  
descriptors without the need to copy data into userspace. Instead of a  
userspace buffer, they rely on an ordinary Unix pipe as a kernel-level  
buffer.

- [io\_splice - zero-copy pipe I/O for Linux and Ruby](http://bogomips.org/ruby_io_splice/)
- removed\_email\_address@domain.invalid
- git://git.bogomips.org/ruby\_io\_splice.git

Changes:

There is a new IO::Splice.copy\_stream method which is similar to  
the IO.copy\_stream method in 1.9 core, but uses splice()  
internally to avoid copies to userspace in situations where  
sendfile() is not possible.

With Linux 2.6.35 (and header files to match), we will also  
export the F\_GETPIPE\_SZ and and F\_SETPIPE\_SZ constants so  
they can be used with fcntl() to resize pipe buffers.

The documentation is also updated to reflect the returned  
usefulness of the IO::Splice::F\_MOVE constant for FUSE  
filesystems under Linux 2.6.35.

I’ve also relicensed to LGPLv2.1+ (from LGPLv3-only) to allow  
bundling with GPLv2-only applications (I’m currently the sole  
copyright holder).
