Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Do you know any file size info & calculation tools?

Featured Replies

31 minutes ago, Stuttered said:

The code is getting increasing complex...

just imagine for a sec how complex is Human DNA! ! !

new bug report -

image.png

Hi,

  • Added some lazy codes

  • Fixed some bugs (and added new ones 😅) .

ShowFileSize__4.rar

2 hours ago, jackyjask said:

just imagine for a sec how complex is Human DNA! ! !

new bug report -

image.png

Should be fixed. Added the auto-type-calc option for LCF-AT requested. Calc button has been removed. Once I'm done or get exhausted from this, I'll add the SRC. ;)

FileSizeCALC_v0.0.5.rar

thanks

but :)

image.png

4 minutes ago, jackyjask said:

thanks

but :)

image.png

Update: Found why it's crashing. Again, same issue. I would somehow need to mix between using Decimal and BigInteger to make the input value longer, which I'm not sure I can do at this point. Appreciate the testing feedback...

Edited by Stuttered

  • Author

OK thanks for new versions guy's. @Stuttered, looks good that you removed the calc button and to calc the results on fly but its not working if I change the format 1000 / 1024. That's bad. Maybe you can fix that too.

I have another request / question about 1000 decimal and 1024 binary. Is there a quick way to get results to see of values I enter of 1000 dec & 1024 binary?

Example: I enter 1 GB / 1024 and I get this...

File Size Breakdown (Binary (1024-based)):

Unit         Size                     Description

------------ ------------------------ --------------------------------

Bits 8,589,934,592 1 Bit = 1/8 Byte

Bytes 1,073,741,824 1 Byte = 8 Bits

Kilobytes 1,048,576 1 KB = 1024 Bytes

Megabytes 1,024 1 MB = 1024 KB

Gigabytes 1 1 GB = 1024 MB

Terabytes 9.766e-4 1 TB = 1024 GB

Petabytes 9.537e-7 1 PB = 1024 TB

...its showing all results of 1024 what sizes they have. If I change now the format to 1000 decimal I get this...

File Size Breakdown (Decimal (1000-based)):

Unit         Size                     Description

------------ ------------------------ --------------------------------

Bits 8,000,000,000 1 Bit = 1/8 Byte

Bytes 1,000,000,000 1 Byte = 8 Bits

Kilobytes 1,000,000 1 KB = 1000 Bytes

Megabytes 1,000 1 MB = 1000 MB

Gigabytes 1 1 GB = 1000 MB

Terabytes 1.000e-3 1 TB = 1000 GB

Petabytes 1.000e-6 1 PB = 1000 PB

...what shows me same in decimal. But now I want to know how large is 1 GB / 1000 decimal in 1024 binary is but I don't get to see the results of it and I need to do this manually.

  • 1,000,000,000 Byte of decimal results / copy

  • Paste value into edit control

  • Change format to 1024

  • Change unit to Bytes and I get this results out

File Size Breakdown (Binary (1024-based)):

Unit         Size                     Description

------------ ------------------------ --------------------------------

Bits 8,000,000,000 1 Bit = 1/8 Byte

Bytes 1,000,000,000 1 Byte = 8 Bits

Kilobytes 976,562.5 1 KB = 1024 Bytes

Megabytes 953.674316 1 MB = 1024 KB

Gigabytes ---> 0.93132257 1 GB = 1024 MB <---

Terabytes 9.095e-4 1 TB = 1024 GB

Petabytes 8.882e-7 1 PB = 1024 TB

...and now I know the results I want to know. 1 GB / 1000 decimal = 0.93132257 GB / 1024. You know what I mean? I want to get those results too without doing that manually copy / past etc steps. Maybe you guy's could add something for this too to get the results right away. Or you show all results at once. One more time about the DOT & Comma thing. You see the results of 0.93132257 GB but the DOT is a problem. If I enter this value via copy / paste into a calculator its showing "93.132.257" instead what means the calculator did not handle the DOT as Comma. Maybe you can correct that too anyhow to set the Comma where it belongs too. So I hope my requests are not too demanding. 🙂 Thanks.

greetz

2 hours ago, LCF-AT said:

OK thanks for new versions guy's. @Stuttered, looks good that you removed the calc button and to calc the results on fly but its not working if I change the format 1000 / 1024. That's bad. Maybe you can fix that too.

I have another request / question about 1000 decimal and 1024 binary. Is there a quick way to get results to see of values I enter of 1000 dec & 1024 binary?

Example: I enter 1 GB / 1024 and I get this...

File Size Breakdown (Binary (1024-based)):

Unit         Size                     Description

------------ ------------------------ --------------------------------

Bits 8,589,934,592 1 Bit = 1/8 Byte

Bytes 1,073,741,824 1 Byte = 8 Bits

Kilobytes 1,048,576 1 KB = 1024 Bytes

Megabytes 1,024 1 MB = 1024 KB

Gigabytes 1 1 GB = 1024 MB

Terabytes 9.766e-4 1 TB = 1024 GB

Petabytes 9.537e-7 1 PB = 1024 TB

...its showing all results of 1024 what sizes they have. If I change now the format to 1000 decimal I get this...

File Size Breakdown (Decimal (1000-based)):

Unit         Size                     Description

------------ ------------------------ --------------------------------

Bits 8,000,000,000 1 Bit = 1/8 Byte

Bytes 1,000,000,000 1 Byte = 8 Bits

Kilobytes 1,000,000 1 KB = 1000 Bytes

Megabytes 1,000 1 MB = 1000 MB

Gigabytes 1 1 GB = 1000 MB

Terabytes 1.000e-3 1 TB = 1000 GB

Petabytes 1.000e-6 1 PB = 1000 PB

...what shows me same in decimal. But now I want to know how large is 1 GB / 1000 decimal in 1024 binary is but I don't get to see the results of it and I need to do this manually.

  • 1,000,000,000 Byte of decimal results / copy

  • Paste value into edit control

  • Change format to 1024

  • Change unit to Bytes and I get this results out

File Size Breakdown (Binary (1024-based)):

Unit         Size                     Description

------------ ------------------------ --------------------------------

Bits 8,000,000,000 1 Bit = 1/8 Byte

Bytes 1,000,000,000 1 Byte = 8 Bits

Kilobytes 976,562.5 1 KB = 1024 Bytes

Megabytes 953.674316 1 MB = 1024 KB

Gigabytes ---> 0.93132257 1 GB = 1024 MB <---

Terabytes 9.095e-4 1 TB = 1024 GB

Petabytes 8.882e-7 1 PB = 1024 TB

...and now I know the results I want to know. 1 GB / 1000 decimal = 0.93132257 GB / 1024. You know what I mean? I want to get those results too without doing that manually copy / past etc steps. Maybe you guy's could add something for this too to get the results right away. Or you show all results at once. One more time about the DOT & Comma thing. You see the results of 0.93132257 GB but the DOT is a problem. If I enter this value via copy / paste into a calculator its showing "93.132.257" instead what means the calculator did not handle the DOT as Comma. Maybe you can correct that too anyhow to set the Comma where it belongs too. So I hope my requests are not too demanding. 🙂 Thanks.

greetz

Hmmm... Not sure I can do that, but I'll take a look. Here is v0.0.7.

FileSizeCALC_x86_v0.0.7.rar

not a bug just curiuos -

why TB, PB lines are always showing e+-xxx scientific format?

also would be nice to allow resizing the window as for big values one need to use scroller.....

image.png

wow!

why is that? :)

image.png

nice to have - actual build -

image.png

Calculator

Not sure if this is any good for you or not

mitigated big numbers/overflows

image.png

FileSizeCALC-0.0.8custom.zip

16 hours ago, jackyjask said:

not a bug just curiuos -

why TB, PB lines are always showing e+-xxx scientific format?

also would be nice to allow resizing the window as for big values one need to use scroller.....

image.png

wow!

why is that? :)

image.png

nice to have - actual build -

image.png

Only because this is how the online app does it, I guess?

No image preview

this — Postimages

App still needs some clean up, and the stretchable is fine. The internal VER I don't care about atm.

3 hours ago, jackyjask said:

mitigated big numbers/overflows

image.png

FileSizeCALC-0.0.8custom.zip

Nice! I'll take a look at the changes.

Edited by Stuttered

@jackyjask , Can you increase the MaxLength to like 35 and see if you run into issues?

I've seen you are trying to load icon from the file on disk, but the icon is already embedded into the exe itself.... lets solve this micro puzzle:

  • how to reuse existing embedded icon (as native PE resorce) and assign it into the Form icon property?

I triedd this but for some reason I hit 0 (null?) response


		[DllImport("user32.dll", SetLastError = true)]
		static extern IntPtr LoadImage(IntPtr hInstance, IntPtr lpName, uint uType, int cxDesired, int cyDesired, uint fuLoad);

		[DllImport("kernel32.dll", SetLastError = true)]
		static extern IntPtr GetModuleHandle(string lpModuleName);

		[DllImport("kernel32.dll")]
		static extern uint GetLastError();

		public Form1(string filePath = null)
		{
			const uint IMAGE_ICON = 1;
			const uint LR_DEFAULTSIZE = 0x0040;
			const uint LR_SHARED = 0x8000;

			IntPtr hm = GetModuleHandle(null);

			IntPtr hIcon = LoadImage(hm, (IntPtr)3, IMAGE_ICON, 32, 32, LR_DEFAULTSIZE | LR_SHARED);   //  0  ... why?

			uint why = GetLastError();      //  0 here  - means no issue?? WTF?!
2 minutes ago, jackyjask said:

I've seen you are trying to load icon from the file on disk, but the icon is already embedded into the exe itself.... lets solve this micro puzzle:

  • how to reuse existing embedded icon (as native PE resorce) and assign it into the Form icon property?

I triedd this but for some reason I hit 0 (null?) response


		[DllImport("user32.dll", SetLastError = true)]
		static extern IntPtr LoadImage(IntPtr hInstance, IntPtr lpName, uint uType, int cxDesired, int cyDesired, uint fuLoad);

		[DllImport("kernel32.dll", SetLastError = true)]
		static extern IntPtr GetModuleHandle(string lpModuleName);

		[DllImport("kernel32.dll")]
		static extern uint GetLastError();

		public Form1(string filePath = null)
		{
			const uint IMAGE_ICON = 1;
			const uint LR_DEFAULTSIZE = 0x0040;
			const uint LR_SHARED = 0x8000;

			IntPtr hm = GetModuleHandle(null);

			IntPtr hIcon = LoadImage(hm, (IntPtr)3, IMAGE_ICON, 32, 32, LR_DEFAULTSIZE | LR_SHARED);   //  0  ... why?

			uint why = GetLastError();      //  0 here  - means no issue?? WTF?!

Yeah, I saw that. There is a way to do it, but I need to go back and look at an older code project to remember how...

oooooooooops

C# .net BigInter type DOES NOT support numbers with decimal points......... what a pity!

so seems we do not have in-built .net type for very big numbers together with decimal points...

decided to use this public/free lib:

GitHub
No image preview

GitHub - peteroupc/Numbers: A C# implementation of arbitr...

A C# implementation of arbitrary-precision numbers and arithmetic - peteroupc/Numbers

using it seems all is looking nice!

eg:

Uploading Attachment...

image.png

21 minutes ago, jackyjask said:

oooooooooops

C# .net BigInter type DOES NOT support numbers with decimal points......... what a pity!

so seems we do not have in-built .net type for very big numbers together with decimal points...

decided to use this public/free lib:

GitHub
No image preview

GitHub - peteroupc/Numbers: A C# implementation of arbitr...

A C# implementation of arbitrary-precision numbers and arithmetic - peteroupc/Numbers

using it seems all is looking nice!

eg:

Uploading Attachment...

image.png

Well, I guess that's why it would not work. The icon issue is fixed, You have to add the .ico as a resource and then add code.

Right-click on project->properties. Add icon (icon and manifest).

Add .ico to .resx file (double-click and then add)

Add code below:

Code:

// Explicitly set the form's icon from the executable

try

{

this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);

}

catch (Exception ex)

{

MessageBox.Show($"Error loading icon: {ex.Message}", "Icon Load Error");

}

Update:

I have incorporated the library, and may have this working... app update in a bit...

FileSizeCalc.ico

Edited by Stuttered

2 hours ago, jackyjask said:

oooooooooops

C# .net BigInter type DOES NOT support numbers with decimal points......... what a pity!

so seems we do not have in-built .net type for very big numbers together with decimal points...

decided to use this public/free lib:

GitHub
No image preview

GitHub - peteroupc/Numbers: A C# implementation of arbitr...

A C# implementation of arbitrary-precision numbers and arithmetic - peteroupc/Numbers

using it seems all is looking nice!

eg:

Uploading Attachment...

image.png

Bro, what is this & how touse this in c#...

Edited by .hloire

2 hours ago, Stuttered said:

Well, I guess that's why it would not work. The icon issue is fixed, You have to add the .ico as a resource and then add code.

Right-click on project->properties. Add icon (icon and manifest).

Add .ico to .resx file (double-click and then add)

Add code below:

Code:

// Explicitly set the form's icon from the executable

try

{

this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);

}

catch (Exception ex)

{

MessageBox.Show($"Error loading icon: {ex.Message}", "Icon Load Error");

}

Update:

I have incorporated the library, and may have this working... app update in a bit...

FileSizeCalc.ico

Update v0.0.10. Thx @jackyjask for pointing to the BigNumber library and assist. See attached.

FileSizeCALC_v0.0.10.rar

3 hours ago, Stuttered said:

this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);

damn it! this is GENIOUS! (instead of WinAPI old dirty crap!!!)

1 hour ago, .hloire said:

Bro, what is this & how touse this in c#...

easy! just read the docs :)

built a binary using that multi-precision lib: (left vs last build fom @Stuttered )

image.png

FileSizeCALC_0.0.11.zip

41 minutes ago, jackyjask said:

damn it! this is GENIOUS! (instead of WinAPI old dirty crap!!!)

easy! just read the docs :)

built a binary using that multi-precision lib: (left vs last build fom @Stuttered )

image.png

FileSizeCALC_0.0.11.zip

Seems like we have a winner! 👍

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.