Module | Spruz::FileBinary |
In: |
lib/spruz/file_binary.rb
lib/spruz/file_binary.rb |
default_options | [RW] | Default options can be queried/set via this hash. |
default_options | [RW] | Default options can be queried/set via this hash. |
Returns true if FileBinary#binary? returns false, false if FileBinary#binary? returns true, and nil otherwise. For an explanation of options, see FileBinary#binary?.
Returns true if FileBinary#binary? returns false, false if FileBinary#binary? returns true, and nil otherwise. For an explanation of options, see FileBinary#binary?.
Returns true if this file is considered to be binary, false if it is not considered to be binary, and nil if it was empty.
A file is considered to be binary if the percentage of zeros exceeds options[:percentage_zeros] or the percentage of binary bytes (8-th bit is 1) exceeds options[:percentage_binary] in the buffer of size options[:buffer_size] that is checked (beginning from offset options[:offset]). If an option isn‘t given the one from FileBinary.default_options is used instead.
Returns true if this file is considered to be binary, false if it is not considered to be binary, and nil if it was empty.
A file is considered to be binary if the percentage of zeros exceeds options[:percentage_zeros] or the percentage of binary bytes (8-th bit is 1) exceeds options[:percentage_binary] in the buffer of size options[:buffer_size] that is checked (beginning from offset options[:offset]). If an option isn‘t given the one from FileBinary.default_options is used instead.