- Posts: 563
- Thank you received: 27
What's the equivalent of 32KB?
- darragh
- Offline
- Administrator
Most modern tools like Java will use single byte representation where possible.
32Kbytes is 32 * 1024 * characters (Characters in the Ascii standard are representable as a byte )
So that is 32768 characters and given that most lines of text are about 80 characters, that represents 410 lines of text.
Walter Scott Houston's book Deep Sky Wonders has approximately 44 lines per page, so 32 Kbytes would present about 9 pages of text in his book
Except that UTF-8 and just about every modern character encoding scheme uses two bytes rather than 1 .... so half that
Go check it out with this sample:
[code:1]
Byte byteStr[] = "a".getBytes();
System.out.println("Length of byte representation: "+byteStr.length);
[/code:1]
Please Log in or Create an account to join the conversation.
- voyager
- Offline
- Super Giant
- Posts: 3663
- Thank you received: 2
Most modern tools like Java will use single byte representation where possible.
32Kbytes is 32 * 1024 * characters (Characters in the Ascii standard are representable as a byte )
So that is 32768 characters and given that most lines of text are about 80 characters, that represents 410 lines of text.
Walter Scott Houston's book Deep Sky Wonders has approximately 44 lines per page, so 32 Kbytes would present about 9 pages of text in his book
Except that UTF-8 and just about every modern character encoding scheme uses two bytes rather than 1 .... so half that
Go check it out with this sample:
[code:1]
Byte byteStr[] = "a".getBytes();
System.out.println("Length of byte representation: "+byteStr.length);
[/code:1]
I stand corrected .... unless you're writing in Chinese or some such.
Bart.
My Home Page - www.bartbusschots.ie
Please Log in or Create an account to join the conversation.
- pmgisme
- Offline
- Red Giant
- Posts: 754
- Thank you received: 0
You don't need Hi-Fi frequencies above 10KHz in any spoken telephone conversation to have a perfectly normal conversation.
Unless you usually shriek like an alto-soprano.
Or sing songs over the phone.
Peter.
Please Log in or Create an account to join the conversation.
- dmcdona
- Topic Author
- Offline
- Administrator
- Posts: 4557
- Thank you received: 76
can I ask why you are worried about such a small file size such as 32KB
32KB was the extent of the memory in the Apollo Guidance and Navigation system that landed Man on the moon and brought him back home.
So, one second of high quality audio, two words on Skype or a few pages of text ...
Puts it into persepective...
Please Log in or Create an account to join the conversation.
- pmgisme
- Offline
- Red Giant
- Posts: 754
- Thank you received: 0
It had to be.
Modern software writes 5000 lines of code when one efficient line would do.
Intel's mantra is:
"Whatever we build, Microsoft will drag it to its knees."
Peter.
Please Log in or Create an account to join the conversation.
- voyager
- Offline
- Super Giant
- Posts: 3663
- Thank you received: 2
The Apollo software was hyper efficient.
It had to be.
Modern software writes 5000 lines of code when one efficient line would do.
Intel's mantra is:
"Whatever we build, Microsoft will drag it to its knees."
Peter.
And that's why smart people user Macs
My Home Page - www.bartbusschots.ie
Please Log in or Create an account to join the conversation.