zip/unzip code

Just starting out? Need help? Post your questions and find answers here.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 565
Joined: Tue Jan 04, 2011 6:21 pm

zip/unzip code

Post by SPH »

Hi,

Have any of you ever coded a zip/unzip program in purebasic?
If so, please post your answer here.

// Moved from "Applications - Feedback and Discussion" to "Coding Questions" (Kiffi)

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
Mr.L
Enthusiast
Enthusiast
Posts: 146
Joined: Sun Oct 09, 2011 7:39 am

Re: zip/unzip code

Post by Mr.L »

yes, I have... :wink:

Code: Select all

InitSprite():OpenWindow(0,0,0,800,570,"Zip/Unzip - move mouse",#PB_Window_ScreenCentered|#PB_Window_SystemMenu):OpenWindowedScreen(WindowID(0),0,0,800,600):LoadFont(0,"Arial",100,#PB_Font_Bold)
CreateSprite(0,30,300):StartDrawing(SpriteOutput(0))
Box(0,0,30,280,RGB(64,80,200)):
For i=0 To 275 Step 10:Box(0,i,30,4,RGB(50,70,180)):Next:Box(2,275,26,14,1):Box(12,280,8,20,1):Box(10,292,12,8,1):StopDrawing()
CreateSprite(1,100,55):StartDrawing(SpriteOutput(1)):Box(0,0,100,55,#Gray):Box(2,2,96,51,1):Box(60,6,30,38,#Gray):Box(62,8,26,34,0):StopDrawing()
Repeat
	ClearScreen(#White)
	StartDrawing(ScreenOutput()):DrawingFont(FontID(0)):DrawText(200,210,"Zip/Unzip", #Red,#White):StopDrawing()
	mx=DesktopMouseX()-WindowX(0):If mx < -100:mx=-100:EndIf
	x.f=-5:y.f=-5:xd.f=14:yd.f=0:a.f=0
	For i = 0 To 80
		RotateSprite(0,a,#PB_Absolute):DisplayTransparentSprite(0,x,y)
		RotateSprite(0,180-a,#PB_Absolute):DisplayTransparentSprite(0,x-7,275-y)
		x + xd:If x > mx:a-3:xd-0.5:yd-Sqr((x-mx)*0.002):y+yd:EndIf
	Next
	DisplayTransparentSprite(1,mx-50,262):FlipBuffers()
	While WindowEvent():If Event()=#PB_Event_CloseWindow:End:EndIf:Delay(0):Wend
ForEver
BarryG
Addict
Addict
Posts: 4160
Joined: Thu Apr 18, 2019 8:17 am

Re: zip/unzip code

Post by BarryG »

:lol:
User avatar
idle
Always Here
Always Here
Posts: 5864
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: zip/unzip code

Post by idle »

Mr.L wrote: Sun Aug 11, 2024 11:26 pm yes, I have... :wink:
That's a good one! :lol:
User avatar
SPH
Enthusiast
Enthusiast
Posts: 565
Joined: Tue Jan 04, 2011 6:21 pm

Re: zip/unzip code

Post by SPH »

@Monsieur L : hahahhahaa, lol :mrgreen:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: zip/unzip code

Post by boddhi »

Mr.L wrote: yes, I have... :wink:
[...]
What a masterful demonstration! :lol: :lol: :lol:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Post Reply