Update README.md

This commit is contained in:
2024-11-29 01:13:26 +00:00
parent b9250b811f
commit 289aba72ab

View File

@@ -4,7 +4,11 @@ This is an implementation of [OpenSubtitle's Moviehash](https://trac.opensubtitl
```ruby ```ruby
Moviehash.compute_hash("test/files/breakdance.avi") Moviehash.compute_hash("test/files/breakdance.avi")
=> "8e245d9679d31e12" => "8e245d9679d31e12"
# via the web - run this in the console: ```
When computing the hash of a file on the web, only the required bytes are downloaded, using HTTP's Range requests
```ruby
# via the web - run this in the console to test:
# ruby -run -e httpd test/files -p 8000 # ruby -run -e httpd test/files -p 8000
Moviehash.compute_hash("http://localhost:8000/breakdance.avi") Moviehash.compute_hash("http://localhost:8000/breakdance.avi")
=> "8e245d9679d31e12" => "8e245d9679d31e12"