Skip to content

Commit f5f7588

Browse files
committed
Windows PowerShell commands
1 parent a8b4109 commit f5f7588

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

episodes/02-image-basics.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -881,20 +881,22 @@ two orders of magnitude smaller than the bitmap version.
881881
## Comparing lossless versus lossy compression (optional, not included in timing)
882882

883883
Let us see a hands-on example of lossless versus lossy compression.
884-
Once again, open a terminal and navigate to the `data/` directory.
884+
Open a terminal (or Windows PowerShell) and navigate to the `data/` directory.
885885
The two output images, `ws.bmp` and `ws.jpg`, should still be in the directory,
886886
along with another image, `tree.jpg`.
887887

888888
We can apply lossless compression to any file by using the `zip` command.
889889
Recall that the `ws.bmp` file contains 75,000,054 bytes.
890890
Apply lossless compression to this image by executing the following command:
891-
`zip ws.zip ws.bmp`.
891+
`zip ws.zip ws.bmp`
892+
(`Compress-Archive ws.bmp ws.zip` with PowerShell).
892893
This command tells the computer to create a new compressed file,
893894
`ws.zip`, from the original bitmap image.
894-
Execute a similar command on the tree JPEG file: `zip tree.zip tree.jpg`.
895+
Execute a similar command on the tree JPEG file: `zip tree.zip tree.jpg`
896+
(`Compress-Archive tree.jpg jpg.zip` with PowerShell).
895897

896898
Having created the compressed file,
897-
use the `ls -al` command to display the contents of the directory.
899+
use the `ls -al` command (`dir` with PowerShell) to display the contents of the directory.
898900
How big are the compressed files?
899901
How do those compare to the size of `ws.bmp` and `tree.jpg`?
900902
What can you conclude from the relative sizes?

0 commit comments

Comments
 (0)