Can't you use Zip::ZipFile.read here?

```ruby
    # Returns a string containing the contents of the specified entry
    def read(entry)
      get_input_stream(entry) { |is| is.read } 
    end
```

I guess in this way the temporal filesystem structure could be avoided. When you need to extract docx you can use a Hash to store entry names as keys and contents as values, so you can add new entries to the hash, modify existing entries, etc... Maybe you've tried and I'm forgetting something, so just asking atm :) Thanks!