Skip to content

brentgreeff/bit_counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Case A: Bit Counter

1. Suppose you have a large file (eg. jpg)

2. A file is stored on a disk as a bunch of zeros and ones

3. We want to know how many zeros and ones there are in the file

4. We would like to do a call (in IRB) (or something like it):

count_bits "/path/to/some/file.jpg"

Example output (to stdout is ok):

found 456 bits set to 1
found 128 bits set to 0

About

Count 1s and 0s in a file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages