Can you use JavaScript To Unpack Files?

What i mean is it possible to use javascript and html to copy contents from a server to the users computer. After promting them. If not is there a code to make a button automatically adoped a "save target as" function. instead of right clicking and selecting "save target as"
Update: i won't for files the browser understands aka html files
2 answers 2