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

  • SEARCH
  • Home
  • 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 3220220
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:44:11+00:00 2026-05-17T15:44:11+00:00

Hey guys.. I am writing a Windows application in C# that minifies CSS files

  • 0

Hey guys.. I am writing a Windows application in C# that minifies CSS files and packs JS files as a batch job. One hurdle for the application is, what if the user selects a JavaScript file that has already been packed? It will end up increasing the file size, defeating my purpose entirely!

Is opening the file and looking for the string eval(function(p,a,c,k,e,d) enough? My guess is no, as there are other JS packing methods out there. Help me out!

  • 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-05-17T15:44:11+00:00Added an answer on May 17, 2026 at 3:44 pm

    One might suggest that you compare the size of the pre and post packed JS and return/use the smaller of the two.

    UPDATE based on question in comment by GPX on Sep 30 at 1:02

    The following is a very simple way to tell. There may be different, or more accurate, ways of determining this, but this should get you going in the right direction:

    var unpackedJs = File.ReadAllText(...)
    var unpackedSize = jsContent.Length;
    var packedJs = ... // Your Packaging routine
    File.WriteAllText(pathToFile, unpackedSize < packedJs.Length ? unpackedJs : packedJs)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I am writing an application that retrieves the Group Names and access
Hey guys/gals I'm writing a python script that fixes some duplicate issues on my
Hey guys, here is my problem. I am writing a Drupal module. A user
Hey guys, Im working with wpf 3d, im currently writing a program that will
Hey guys, I have a Cocoa application that sends an NSDictionary over the network
Hey guys, I have a problem with a code that I've been writing. I
Hey guys! I need some help writing a code that creates an array in
Hey guys i am using edit text in my application. Problem arises if user
Hey Guys, I am writing a performance monitor program that keeps track of different
Hey guys I'm writing a simple web program to get my feet wet in

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.