Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7816633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:56:08+00:00 2026-06-02T05:56:08+00:00

I badly need a random file generator that generates a truly random, non-compressible dummy

  • 0

I badly need a random file generator that generates a truly random, non-compressible dummy files.

I ended up with this delphi code. It works, but it’s painfully sloooow

 var
    Buf     : Integer;
    TheFile : TFileStream;
 begin
      TheFile := TFileStream.Create(FileName, fmCreate OR fmOpenReadWrite);
      with TheFile do
      begin
           for i := 0 to FileSize do    // Iterate
           begin
                Buf := Random(999999) * i;
                WriteBuffer(Buf, SizeOf(Buf));
           end;    // for
      end;    // with
 end,

My question is: Is there a fast random file generator that I can use? Both Delphi code and/or commandline tools are acceptable as long as:

  1. I can run it on Windows without manual intervention (I need this for my tests, no intervention is allowed)
  2. It’s fast
  3. Files generated is non-compressible (ie. compressing the generated file results in no space saving)

EDIT For those interested, I applied the advice I received here and made this function, it’s fast enough & 7zip has hard time compressing the generated data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:56:09+00:00Added an answer on June 2, 2026 at 5:56 am

    Use a 4096-byte page-size, or multiple page-size, buffer. Writing one integer at a time will be slow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to have this API badly quickly. I went on Microsoft Connect but
i need your help about this issue badly. i am trying to model a
I am having an absolute headache figuring this out. I badly need some help
I am completely new to C and need help with this badly. Im reading
I wasn't able to get an answer to this and i need it badly!
i need your help badly because i cannot solve this problem on my own.
As you may know, Silverlight 3 doesn't support IMultiValueConverter and... I badly need it.
Sorry for a badly-phrased question. I have a requirement coming from a non-technical person
That was probably a very badly worded question, but I'm curious how Rails knows
I have a branch in a badly structured svn repo that needs to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.