Update Documentation - RingZip Chapter - Using Classes Examples.
@@ -55,4 +55,88 @@ Example : Print file names in the myfile.zip
next
zip_close(oZip)
+.. index::
+ pair: RingZip; Using RingZip Classes
+
+Using RingZip Classes
+=====================
+
+The RingZip library comes with two classes. The Zip class and the ZipEntry class.
+
+Example (1):
+
+.. code-block:: ring
+
+ load "ziplib.ring"
+
+ new Zip {
+ setFileName("myfile.zip")
+ open("w")
+ newEntry() {
+ open("test.c")
+ writefile("test.c")
+ close()
+ }
+ close()
+ }
+
+Example (2):
+
+.. code-block:: ring
+
+ load "ziplib.ring"
+
+ new Zip {
+ SetFileName("myfile.zip")
+ Open("w")
+ AddFile("test.c")
+ AddFile("zip.c")
+ AddFile("zip.h")
+ AddFile("miniz.h")
+ Close()
+ }
+
+
+Example (3):
+
+.. code-block:: ring
+
+ load "ziplib.ring"
+
+ new zip {
+ SetFileName("myfile.zip")
+ ExtractAllFiles("myfolder")
+ }
+
+
+Example (4):
+
+.. code-block:: ring
+
+ load "ziplib.ring"
+
+ new Zip {
+ SetFileName("myfile.zip")
+ Open("r")
+ see FilesCount()
+ Close()
+ }
+
+
+Example (5):
+
+.. code-block:: ring
+
+ load "ziplib.ring"
+
+ new Zip {
+ SetFileName("myfile.zip")
+ Open("r")
+ for x = 1 to filescount()
+ See GetFileNameByIndex(x) + nl
+ next
+ Close()
+ }
+
+
