README.md in vdf-1.0.3 vs README.md in vdf-1.0.4
- old
+ new
@@ -1,11 +1,11 @@
# VDF
[](https://actions-badge.atrox.dev/sapphyrus/vdf/goto)
+[](https://github.com/sapphyrus/vdf/issues)
[](https://rubygems.org/gems/vdf)
[](https://rubydoc.info/gems/vdf)
-[](https://github.com/sapphyrus/vdf/issues)
[](https://github.com/sapphyrus/vdf/blob/master/LICENSE.txt)
VDF is a gem to convert Valve's KeyValue format to Ruby hashes and back, based on the excellent [node-steam/vdf](https://github.com/node-steam/vdf)
## Installation
@@ -63,9 +63,23 @@
}
}
# Generate a VDF string and output it
puts VDF.generate(object)
+
+```
+
+If you're dealing with parsing large files, you should avoid loading them into memory completely. This library supports parsing a VDF file from a File object like this:
+```ruby
+require "vdf"
+
+# Open the file in read mode and parse it.
+parsed = File.open("filename.vdf", "r") do |file|
+ VDF.parse(file)
+end
+
+# Pretty-print the result
+p parsed
```
## Performance comparison