Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate from sector counts in addition to byte count #14

Open
mmstick opened this issue Oct 24, 2018 · 2 comments
Open

Calculate from sector counts in addition to byte count #14

mmstick opened this issue Oct 24, 2018 · 2 comments

Comments

@mmstick
Copy link

mmstick commented Oct 24, 2018

For the use case of displaying unit sizes for block devices, which are measured in sectors instead of bytes (512 bytes per sector).

@LeopoldArkham
Copy link
Owner

Hey, better late than never!

What would you expect from this, a different function someNumber.sector_size(options) or the same function with an extra flag in the options?

Is it always 512 bytes or does that need to change?

Are there any other things you would expect to be able to customise for this use case?

Out of curiosity, what project/use case would you like this for, if it's available publicly?

Thanks in advance.

@mmstick
Copy link
Author

mmstick commented Oct 21, 2019

The sector size isn't guaranteed to be 512. It's the most common sector size, but some SSDs and magnetic drives are using 4096 byte sector sizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants