Hello community,

here is the log from the commit of package laszip for openSUSE:Factory checked 
in at 2020-05-19 14:47:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/laszip (Old)
 and      /work/SRC/openSUSE:Factory/.laszip.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "laszip"

Tue May 19 14:47:54 2020 rev:7 rq:806783 version:3.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/laszip/laszip.changes    2020-03-24 
22:37:05.037227673 +0100
+++ /work/SRC/openSUSE:Factory/.laszip.new.2738/laszip.changes  2020-05-19 
14:47:57.736003413 +0200
@@ -1,0 +2,8 @@
+Mon May 18 07:46:31 UTC 2020 - Martin Pluskal <[email protected]>
+
+- Update to version 3.4.3:
+  * UTF16 filename support and windows unicode support
+  * Fix extra_bytes selective decompression PDAL/PDAL#2799 #62
+  * Compatibility mode fix #60
+
+-------------------------------------------------------------------

Old:
----
  laszip-src-3.4.1.tar.gz
  laszip-src-3.4.1.tar.gz.sha256sum

New:
----
  laszip-src-3.4.3.tar.gz
  laszip-src-3.4.3.tar.gz.sha256sum

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ laszip.spec ++++++
--- /var/tmp/diff_new_pack.oNwWYs/_old  2020-05-19 14:47:58.552005156 +0200
+++ /var/tmp/diff_new_pack.oNwWYs/_new  2020-05-19 14:47:58.556005164 +0200
@@ -17,11 +17,9 @@
 #
 
 
-#
 %define         sover 8
-
 Name:           laszip
-Version:        3.4.1
+Version:        3.4.3
 Release:        0
 Summary:        Compression library supporting ASPRS LAS format data
 License:        LGPL-2.1-or-later
@@ -31,7 +29,6 @@
 Source1:        
https://github.com/LASzip/LASzip/releases/download/%{version}/laszip-src-%{version}.tar.gz.sha256sum
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 A free product of rapidlasso GmbH - quickly turns bulky LAS files into
@@ -95,22 +92,13 @@
 
 %install
 %cmake_install
-# Do not ship any static libraries or .la files
-find %{buildroot} -type f \( -name '*.a' -o -name '*.la' \) -delete -print
-rm -rf %{buildroot}/usr/lib/debug/
-
-# No more available in 3?
-#%%check
-#make %%{?_smp_mflags} check
 
 %post -n lib%{name}%{sover} -p /sbin/ldconfig
 %postun -n lib%{name}%{sover}  -p /sbin/ldconfig
-
 %post -n lib%{name}_api%{sover} -p /sbin/ldconfig
 %postun -n lib%{name}_api%{sover}  -p /sbin/ldconfig
 
 %files devel
-%defattr(-,root,root)
 %license COPYING
 %doc ChangeLog AUTHORS
 %dir %{_includedir}/%{name}
@@ -120,23 +108,13 @@
 %{_libdir}/lib%{name}_api.so
 
 %files -n lib%{name}%{sover}
-%defattr(-,root,root)
 %doc ChangeLog AUTHORS
-%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
 %license COPYING
-%else
-%doc COPYING
-%endif
 %{_libdir}/lib%{name}.so.*
 
 %files -n lib%{name}_api%{sover}
-%defattr(-,root,root)
 %doc ChangeLog AUTHORS
-%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
 %license COPYING
-%else
-%doc COPYING
-%endif
 %{_libdir}/lib%{name}_api.so.*
 
 %changelog

++++++ laszip-src-3.4.1.tar.gz -> laszip-src-3.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/CHANGES.txt 
new/laszip-src-3.4.3/CHANGES.txt
--- old/laszip-src-3.4.1/CHANGES.txt    2019-04-12 21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/CHANGES.txt    2019-11-11 21:31:12.000000000 +0100
@@ -1,3 +1,8 @@
+ 9 November 2019 -- upped version to 3.4 revision 3 for selective 
decompression extra bytes fix
+ 9 November 2019 -- fix for selective decompression of more than 16 extra 
bytes in new point types 6 or higher
+ 9 November 2019 -- moved UTF8toUTF16() function from laszip.hpp to mydefs.hpp 
and added new mydefs.cpp
+16 October 2019 -- unicode support added for Windows LASzip.dll via in new 
UTF8toUTF16() function
+11 August 2019 -- added CMake for DLL build and minor fixes to allow 64 bit 
Windows compile of LASzip.dll
 11 April 2019 -- increase AC_BUFFER_SIZE from 1024 to 4096 to lower chance of 
ultra-rare propagate_carry() overflow
 10 April 2019 -- fix potential memory leaks found by Connor Manning using 
valgrind
 31 March 2019 -- better license terms for core arithmetic coder thanks to Amir 
Said. upgrade to version 3.4 rev 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/CMakeLists.txt 
new/laszip-src-3.4.3/CMakeLists.txt
--- old/laszip-src-3.4.1/CMakeLists.txt 2019-04-12 21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/CMakeLists.txt 2019-11-11 21:31:12.000000000 +0100
@@ -7,7 +7,7 @@
 
 # the next line is the ONLY place in the entire laszip system where
 # the version info is hard-coded
-set(LASZIP_API_VERSION_STRING "3.4.1" CACHE STRING "LASzip version" FORCE)
+set(LASZIP_API_VERSION_STRING "3.4.3" CACHE STRING "LASzip version" FORCE)
 
 include (CheckIncludeFileCXX)
 include(${ROOT_DIR}/cmake/common.cmake NO_POLICY_SCOPE)
@@ -41,7 +41,7 @@
 # libtool SO version naming
 # 8.0.0 for 3.2.1
 # 9.0.0 for 4.0+
-set(LASZIP_SO_VERSION "8.0.4")
+set(LASZIP_SO_VERSION "8.0.5")
 set(LASZIP_COMPATIBILITY_VERSION 8)
 
 check_include_file_cxx ("unordered_map" HAVE_UNORDERED_MAP)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/dll/laszip_api.c 
new/laszip-src-3.4.3/dll/laszip_api.c
--- old/laszip-src-3.4.1/dll/laszip_api.c       2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/dll/laszip_api.c       2019-11-11 21:31:12.000000000 
+0100
@@ -957,7 +957,11 @@
   }
   // Load DLL file
 #ifdef _WIN32
+#ifdef _WIN64
+  laszip_HINSTANCE = LoadLibrary(TEXT("LASzip64.dll"));
+#else
   laszip_HINSTANCE = LoadLibrary(TEXT("LASzip.dll"));
+#endif // _WIN64
 #elif __APPLE__
   laszip_HINSTANCE = LoadLibrary("liblaszip.dylib", RTLD_NOW);
 #else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/CMakeLists.txt 
new/laszip-src-3.4.3/src/CMakeLists.txt
--- old/laszip-src-3.4.1/src/CMakeLists.txt     2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/CMakeLists.txt     2019-11-11 21:31:12.000000000 
+0100
@@ -18,7 +18,6 @@
     lasreaditemcompressed_v3.cpp
     lasreaditemcompressed_v4.cpp
     lasreadpoint.cpp
-    #lasunzipper.cpp
     laswriteitemcompressed_v1.cpp
     laswriteitemcompressed_v2.cpp
     laswriteitemcompressed_v3.cpp
@@ -26,6 +25,7 @@
     laswritepoint.cpp
     laszip.cpp
     laszip_dll.cpp
+    mydefs.cpp
 )
 
 add_definitions(-DLASZIPDLL_EXPORTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasindex.cpp 
new/laszip-src-3.4.3/src/lasindex.cpp
--- old/laszip-src-3.4.1/src/lasindex.cpp       2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/lasindex.cpp       2019-11-11 21:31:12.000000000 
+0100
@@ -342,7 +342,13 @@
     name[strlen(name)-2] = 'a';
     name[strlen(name)-1] = 'x';
   }
+#ifdef _MSC_VER
+  wchar_t* utf16_name = UTF8toUTF16(name);
+  FILE* file = _wfopen(utf16_name, L"rb");
+  delete [] utf16_name;
+#else
   FILE* file = fopen(name, "rb");
+#endif
   if (file == 0)
   {
     free(name);
@@ -379,7 +385,13 @@
 
   lasreader->close();
 
+#ifdef _MSC_VER
+  wchar_t* utf16_file_name = UTF8toUTF16(file_name);
+  FILE* file = _wfopen(utf16_file_name, L"rb");
+  delete [] utf16_file_name;
+#else
   FILE* file = fopen(file_name, "rb");
+#endif
   ByteStreamIn* bytestreamin = 0;
   if (IS_LITTLE_ENDIAN())
     bytestreamin = new ByteStreamInFileLE(file);
@@ -443,7 +455,13 @@
   fclose(file);
 
   ByteStreamOut* bytestreamout;
+#ifdef _MSC_VER
+  utf16_file_name = UTF8toUTF16(file_name);
+  file = _wfopen(utf16_file_name, L"rb+");
+  delete [] utf16_file_name;
+#else
   file = fopen(file_name, "rb+");
+#endif
   if (IS_LITTLE_ENDIAN())
     bytestreamout = new ByteStreamOutFileLE(file);
   else
@@ -517,7 +535,13 @@
     name[strlen(name)-2] = 'a';
     name[strlen(name)-1] = 'x';
   }
+#ifdef _MSC_VER
+  wchar_t* utf16_name = UTF8toUTF16(name);
+  FILE* file = _wfopen(utf16_name, L"wb");
+  delete [] utf16_name;
+#else
   FILE* file = fopen(name, "wb");
+#endif
   if (file == 0)
   {
     fprintf(stderr,"ERROR (LASindex): cannot open '%s' for write\n", name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasindex.hpp 
new/laszip-src-3.4.3/src/lasindex.hpp
--- old/laszip-src-3.4.1/src/lasindex.hpp       2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/lasindex.hpp       2019-11-11 21:31:12.000000000 
+0100
@@ -53,7 +53,7 @@
 class ByteStreamIn;
 class ByteStreamOut;
 
-class LASindex
+class LASLIB_DLL LASindex
 {
 public:
   LASindex();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasinterval.cpp 
new/laszip-src-3.4.3/src/lasinterval.cpp
--- old/laszip-src-3.4.1/src/lasinterval.cpp    2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/lasinterval.cpp    2019-11-11 21:31:12.000000000 
+0100
@@ -301,7 +301,7 @@
     }
     map_element++;
   }
-  fprintf(stderr,"largest interval gap increased to %u\n", diff);
+  if (verbose) fprintf(stderr,"largest interval gap increased to %u\n", diff);
 
   // update totals
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/laspoint.hpp 
new/laszip-src-3.4.3/src/laspoint.hpp
--- old/laszip-src-3.4.1/src/laspoint.hpp       2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/laspoint.hpp       2019-11-11 21:31:12.000000000 
+0100
@@ -25,6 +25,7 @@
   
   CHANGE HISTORY:
   
+    10 May 2019 -- checking for overflows in X, Y, Z of I32 of fixed-point LAS 
     15 June 2018 -- fix in flag copy from legacy (0-5) to extended (6-10) type
     10 March 2017 -- fix in copy_to() and copy_from() new LAS 1.4 point types
     10 October 2016 -- small fixes for NIR and extended scanner channel
@@ -560,7 +561,9 @@
   inline U16 get_point_source_ID() const { return point_source_ID; };
   inline U8 get_deleted_flag() const { return deleted_flag; };
   inline F64 get_gps_time() const { return gps_time; };
-  inline const U16* get_rgb() const { return rgb; };
+  inline const U16* get_RGB() const { return rgb; };
+  inline const U16* get_RGBI() const { return rgb; };
+  inline U16 get_RGBI(const U32 band) const { return rgb[band]; };
   inline U16 get_R() const { return rgb[0]; };
   inline U16 get_G() const { return rgb[1]; };
   inline U16 get_B() const { return rgb[2]; };
@@ -586,6 +589,7 @@
   inline void set_gps_time(const F64 gps_time) { this->gps_time = gps_time; };
   inline void set_RGB(const U16* rgb) { memcpy(this->rgb, rgb, sizeof(U16) * 
3); };
   inline void set_RGBI(const U16* rgb) { memcpy(this->rgb, rgb, sizeof(U16) * 
4); };
+  inline void set_RGBI(const U32 band, const U16 value) { rgb[band] = value; };
   inline void set_R(const U16 R) { this->rgb[0] = R; };
   inline void set_G(const U16 G) { this->rgb[1] = G; };
   inline void set_B(const U16 B) { this->rgb[2] = B; };
@@ -596,9 +600,9 @@
   inline F64 get_y() const { return quantizer->get_y(Y); };
   inline F64 get_z() const { return quantizer->get_z(Z); };
 
-  inline void set_x(const F64 x) { this->X = quantizer->get_X(x); };
-  inline void set_y(const F64 y) { this->Y = quantizer->get_Y(y); };
-  inline void set_z(const F64 z) { this->Z = quantizer->get_Z(z); };
+  inline BOOL set_x(const F64 x) { I64 X = quantizer->get_X(x); this->X = 
(I32)(X); return I32_FITS_IN_RANGE(X); };
+  inline BOOL set_y(const F64 y) { I64 Y = quantizer->get_Y(y); this->Y = 
(I32)(Y); return I32_FITS_IN_RANGE(Y); };
+  inline BOOL set_z(const F64 z) { I64 Z = quantizer->get_Z(z); this->Z = 
(I32)(Z); return I32_FITS_IN_RANGE(Z); };
 
   inline BOOL is_extended_point_type() const { return extended_point_type; };
 
@@ -628,18 +632,23 @@
     coordinates[2] = get_z();
   };
 
-  inline void compute_XYZ()
+  inline BOOL compute_XYZ()
   {
-    set_x(coordinates[0]);
-    set_y(coordinates[1]);
-    set_z(coordinates[2]);
-  };
-
-  inline void compute_XYZ(const LASquantizer* quantizer)
-  {
-    X = quantizer->get_X(coordinates[0]);
-    Y = quantizer->get_Y(coordinates[1]);
-    Z = quantizer->get_Z(coordinates[2]);
+    BOOL retX = set_x(coordinates[0]);
+    BOOL retY = set_y(coordinates[1]);
+    BOOL retZ = set_z(coordinates[2]);
+    return (retX && retY && retZ);
+  };
+
+  inline BOOL compute_XYZ(const LASquantizer* quantizer)
+  {
+    I64 X = quantizer->get_X(coordinates[0]);
+    I64 Y = quantizer->get_Y(coordinates[1]);
+    I64 Z = quantizer->get_Z(coordinates[2]);
+    this->X = (I32)(X);
+    this->Y = (I32)(Y);
+    this->Z = (I32)(Z);
+    return (I32_FITS_IN_RANGE(X) && I32_FITS_IN_RANGE(Y) && 
I32_FITS_IN_RANGE(Z));
   };
 
   // generic functions for attributes in extra bytes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasquadtree.hpp 
new/laszip-src-3.4.3/src/lasquadtree.hpp
--- old/laszip-src-3.4.1/src/lasquadtree.hpp    2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/lasquadtree.hpp    2019-11-11 21:31:12.000000000 
+0100
@@ -42,7 +42,7 @@
 
 #define LAS_SPATIAL_QUAD_TREE 0
 
-class LASquadtree
+class LASLIB_DLL LASquadtree
 {
 public:
   LASquadtree();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasquantizer.hpp 
new/laszip-src-3.4.3/src/lasquantizer.hpp
--- old/laszip-src-3.4.1/src/lasquantizer.hpp   2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/lasquantizer.hpp   2019-11-11 21:31:12.000000000 
+0100
@@ -51,9 +51,9 @@
   inline F64 get_y(const I32 Y) const { return y_scale_factor*Y+y_offset; };
   inline F64 get_z(const I32 Z) const { return z_scale_factor*Z+z_offset; };
 
-  inline I32 get_X(const F64 x) const { if (x >= x_offset) return 
(I32)((x-x_offset)/x_scale_factor+0.5); else return 
(I32)((x-x_offset)/x_scale_factor-0.5); };
-  inline I32 get_Y(const F64 y) const { if (y >= y_offset) return 
(I32)((y-y_offset)/y_scale_factor+0.5); else return 
(I32)((y-y_offset)/y_scale_factor-0.5); };
-  inline I32 get_Z(const F64 z) const { if (z >= z_offset) return 
(I32)((z-z_offset)/z_scale_factor+0.5); else return 
(I32)((z-z_offset)/z_scale_factor-0.5); };
+  inline I64 get_X(const F64 x) const { if (x >= x_offset) return 
(I64)(((x-x_offset)/x_scale_factor)+0.5); else return 
(I64)(((x-x_offset)/x_scale_factor)-0.5); };
+  inline I64 get_Y(const F64 y) const { if (y >= y_offset) return 
(I64)(((y-y_offset)/y_scale_factor)+0.5); else return 
(I64)(((y-y_offset)/y_scale_factor)-0.5); };
+  inline I64 get_Z(const F64 z) const { if (z >= z_offset) return 
(I64)(((z-z_offset)/z_scale_factor)+0.5); else return 
(I64)(((z-z_offset)/z_scale_factor)-0.5); };
 
   LASquantizer()
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasreaditemcompressed_v3.cpp 
new/laszip-src-3.4.3/src/lasreaditemcompressed_v3.cpp
--- old/laszip-src-3.4.1/src/lasreaditemcompressed_v3.cpp       2019-04-12 
21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/lasreaditemcompressed_v3.cpp       2019-11-11 
21:31:12.000000000 +0100
@@ -2133,7 +2133,14 @@
 
     changed_Bytes[i] = FALSE;
 
-    requested_Bytes[i] = (decompress_selective & 
(LASZIP_DECOMPRESS_SELECTIVE_BYTE0 << i) ? TRUE : FALSE);
+    if (i > 15) // currently only the first 16 extra bytes can be selectively 
decompressed
+    {
+      requested_Bytes[i] = TRUE;
+    }
+    else
+    {
+      requested_Bytes[i] = (decompress_selective & 
(LASZIP_DECOMPRESS_SELECTIVE_BYTE0 << i) ? TRUE : FALSE);
+    }
   }
 
   /* init the bytes buffer to zero */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasreaditemcompressed_v4.cpp 
new/laszip-src-3.4.3/src/lasreaditemcompressed_v4.cpp
--- old/laszip-src-3.4.1/src/lasreaditemcompressed_v4.cpp       2019-04-12 
21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/lasreaditemcompressed_v4.cpp       2019-11-11 
21:31:12.000000000 +0100
@@ -2133,7 +2133,14 @@
 
     changed_Bytes[i] = FALSE;
 
-    requested_Bytes[i] = (decompress_selective & 
(LASZIP_DECOMPRESS_SELECTIVE_BYTE0 << i) ? TRUE : FALSE);
+    if (i > 15) // currently only the first 16 extra bytes can be selectively 
decompressed
+    {
+      requested_Bytes[i] = TRUE;
+    }
+    else
+    {
+      requested_Bytes[i] = (decompress_selective & 
(LASZIP_DECOMPRESS_SELECTIVE_BYTE0 << i) ? TRUE : FALSE);
+    }
   }
 
   /* init the bytes buffer to zero */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/lasreadpoint.cpp 
new/laszip-src-3.4.3/src/lasreadpoint.cpp
--- old/laszip-src-3.4.1/src/lasreadpoint.cpp   2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/lasreadpoint.cpp   2019-11-11 21:31:12.000000000 
+0100
@@ -545,11 +545,11 @@
       if (current_chunk < tabled_chunks)
       {
         I64 here = instream->tell();
-        if (chunk_starts[current_chunk] != here)
+        if (chunk_starts[current_chunk] != here) // then last chunk was corrupt
         {
           // create error string
           if (last_error == 0) last_error = new CHAR[128];
-          // last chunk was corrupt
+          // report error
           sprintf(last_error, "chunk with index %u of %u is corrupt", 
current_chunk, tabled_chunks);
           return FALSE;
         }
@@ -603,6 +603,10 @@
     // no choice but to fail if adaptive chunking was used
     if (chunk_size == U32_MAX)
     {
+      // create error string
+      if (last_error == 0) last_error = new CHAR[128];
+      // report error
+      sprintf(last_error, "compressor was interrupted before writing adaptive 
chunk table of LAZ file");
       return FALSE;
     }
     // otherwise we build the chunk table as we read the file
@@ -614,6 +618,10 @@
     }
     chunk_starts[0] = chunks_start;
     tabled_chunks = 1;
+    // create warning string
+    if (last_warning == 0) last_warning = new CHAR[128];
+    // report warning
+    sprintf(last_warning, "compressor was interrupted before writing chunk 
table of LAZ file");
     return TRUE;
   }
 
@@ -733,8 +741,32 @@
     }
     // create warning string
     if (last_warning == 0) last_warning = new CHAR[128];
-    // report warning
-    sprintf(last_warning, "corrupt chunk table");
+    // first seek to the end of the file
+    instream->seekEnd();
+    // get position of last byte
+    I64 last_position = instream->tell();
+    // warn if last byte position is before chunk table start position
+    if (last_position <= chunk_table_start_position)
+    {
+      // report warning
+      if (last_position == chunk_table_start_position)
+      {
+        sprintf(last_warning, "chunk table is missing. improper use of LAZ 
compressor?");
+      }
+      else
+      {
+#ifdef _WIN32
+        sprintf(last_warning, "chunk table and %I64d bytes are missing. LAZ 
file truncated during copy or transfer?", chunk_table_start_position - 
last_position);
+#else
+        sprintf(last_warning, "chunk table and %lld bytes are missing. LAZ 
file truncated during copy or transfer?", chunk_table_start_position - 
last_position);
+#endif
+      }
+    }
+    else
+    {
+      // report warning
+      sprintf(last_warning, "corrupt chunk table");
+    }
   }
   if (!instream->seek(chunks_start))
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/laswriteitemcompressed_v3.cpp 
new/laszip-src-3.4.3/src/laswriteitemcompressed_v3.cpp
--- old/laszip-src-3.4.1/src/laswriteitemcompressed_v3.cpp      2019-04-12 
21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/laswriteitemcompressed_v3.cpp      2019-11-11 
21:31:12.000000000 +0100
@@ -52,9 +52,7 @@
   U8 scan_direction_flag : 1;
   U8 edge_of_flight_line : 1;
   U8 legacy_classification : 5;
-  U8 legacy_synthetic_flag : 1;
-  U8 legacy_keypoint_flag  : 1;
-  U8 legacy_withheld_flag  : 1;
+  U8 legacy_flags : 3;
   I8 legacy_scan_angle_rank;
   U8 user_data;
   U16 point_source_ID;
@@ -206,6 +204,8 @@
     delete outstream_point_source;
     delete outstream_gps_time;
   }
+
+//  fprintf(stderr, "%u %u %u %u %u %u %u %u %u\n", 
num_bytes_channel_returns_XY, num_bytes_Z, num_bytes_classification, 
num_bytes_flags, num_bytes_intensity, num_bytes_scan_angle, 
num_bytes_user_data, num_bytes_point_source, num_bytes_gps_time);
 }
 
 inline BOOL 
LASwriteItemCompressed_POINT14_v3::createAndInitModelsAndCompressors(U32 
context, const U8* item)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/laswriteitemcompressed_v4.cpp 
new/laszip-src-3.4.3/src/laswriteitemcompressed_v4.cpp
--- old/laszip-src-3.4.1/src/laswriteitemcompressed_v4.cpp      2019-04-12 
21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/laswriteitemcompressed_v4.cpp      2019-11-11 
21:31:12.000000000 +0100
@@ -52,9 +52,7 @@
   U8 scan_direction_flag : 1;
   U8 edge_of_flight_line : 1;
   U8 legacy_classification : 5;
-  U8 legacy_synthetic_flag : 1;
-  U8 legacy_keypoint_flag  : 1;
-  U8 legacy_withheld_flag  : 1;
+  U8 legacy_flags : 3;
   I8 legacy_scan_angle_rank;
   U8 user_data;
   U16 point_source_ID;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/laszip.cpp 
new/laszip-src-3.4.3/src/laszip.cpp
--- old/laszip-src-3.4.1/src/laszip.cpp 2019-04-12 21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/laszip.cpp 2019-11-11 21:31:12.000000000 +0100
@@ -13,7 +13,7 @@
 
   COPYRIGHT:
 
-    (c) 2007-2013, martin isenburg, rapidlasso - fast tools to catch reality
+    (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality
 
     This is free software; you can redistribute and/or modify it under the
     terms of the GNU Lesser General Licence as published by the Free Software
@@ -29,7 +29,9 @@
 ===============================================================================
 */
 #include "laszip.hpp"
+
 #include "mydefs.hpp"
+
 #include <assert.h>
 
 #include <string.h>
@@ -1001,3 +1003,4 @@
   }
   return 0;
 }
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/laszip.hpp 
new/laszip-src-3.4.3/src/laszip.hpp
--- old/laszip-src-3.4.1/src/laszip.hpp 2019-04-12 21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/laszip.hpp 2019-11-11 21:31:12.000000000 +0100
@@ -65,8 +65,7 @@
 typedef long long SIGNED_INT64;
 #endif
 
-#if defined(_MSC_VER) && \
-    (_MSC_FULL_VER >= 150000000)
+#if defined(_MSC_VER) && (_MSC_FULL_VER >= 150000000)
 #define LASCopyString _strdup
 #else
 #define LASCopyString strdup
@@ -74,8 +73,8 @@
 
 #define LASZIP_VERSION_MAJOR                3
 #define LASZIP_VERSION_MINOR                4
-#define LASZIP_VERSION_REVISION             1
-#define LASZIP_VERSION_BUILD_DATE      190411
+#define LASZIP_VERSION_REVISION             3
+#define LASZIP_VERSION_BUILD_DATE      191111
 
 #define LASZIP_COMPRESSOR_NONE              0
 #define LASZIP_COMPRESSOR_POINTWISE         1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/laszip_dll.cpp 
new/laszip-src-3.4.3/src/laszip_dll.cpp
--- old/laszip-src-3.4.1/src/laszip_dll.cpp     2019-04-12 21:13:25.000000000 
+0200
+++ new/laszip-src-3.4.3/src/laszip_dll.cpp     2019-11-11 21:31:12.000000000 
+0100
@@ -24,6 +24,7 @@
 
   CHANGE HISTORY:
 
+    15 October 2019 -- support reading from and writing to unicode file names 
under Windows
     20 March 2019 -- check consistent legacy and extended classification in 
laszip_write_point()
      7 November 2018 -- assure identical legacy and extended flags in 
laszip_write_point()
     20 October 2018 -- changed (U8*) to (const U8*) for all out->put___() calls
@@ -1200,7 +1201,7 @@
 
     // add the VLR
 
-    if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34735, 8 + number*8, 0, 
(laszip_U8*)key_entries_plus_one))
+    if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34735, (laszip_U16)(8 + 
number*8), 0, (laszip_U8*)key_entries_plus_one))
     {
       sprintf(laszip_dll->error, "setting %u geodouble_params", number);
       return 1;
@@ -1255,7 +1256,7 @@
 
     // add the VLR
 
-    if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34736, number*8, 0, 
(laszip_U8*)geodouble_params))
+    if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34736, 
(laszip_U16)(number*8), 0, (laszip_U8*)geodouble_params))
     {
       sprintf(laszip_dll->error, "setting %u geodouble_params", number);
       return 1;
@@ -1310,7 +1311,7 @@
 
     // add the VLR
 
-    if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34737, number, 0, 
(laszip_U8*)geoascii_params))
+    if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34737, 
(laszip_U16)(number), 0, (laszip_U8*)geoascii_params))
     {
       sprintf(laszip_dll->error, "setting %u geoascii_params", number);
       return 1;
@@ -1386,7 +1387,7 @@
       return 1;
     }
 
-    if (laszip_add_vlr(laszip_dll, "LASF_Spec\0\0\0\0\0\0", 4, 
laszip_dll->attributer->number_attributes*sizeof(LASattribute), 0, 
(laszip_U8*)laszip_dll->attributer->attributes))
+    if (laszip_add_vlr(laszip_dll, "LASF_Spec\0\0\0\0\0\0", 4, 
(laszip_U16)(laszip_dll->attributer->number_attributes*sizeof(LASattribute)), 
0, (laszip_U8*)laszip_dll->attributer->attributes))
     {
       sprintf(laszip_dll->error, "adding the new extra bytes VLR with the 
additional attribute '%s'", name);
       return 1;
@@ -2045,7 +2046,7 @@
 
       // add the compatibility VLR
 
-      if (laszip_add_vlr(laszip_dll, "lascompatible\0\0", 22204, 2+2+4+148, 0, 
(laszip_U8*)out->takeData()))
+      if (laszip_add_vlr(laszip_dll, "lascompatible\0\0", 22204, 
(laszip_U16)(2+2+4+148), 0, (laszip_U8*)out->takeData()))
       {
         sprintf(laszip_dll->error, "adding the compatibility VLR");
         return 1;
@@ -2139,7 +2140,7 @@
 
       // add the extra bytes VLR with the additional attributes
 
-      if (laszip_add_vlr(laszip_dll, "LASF_Spec\0\0\0\0\0\0", 4, 
laszip_dll->attributer->number_attributes*sizeof(LASattribute), 0, 
(laszip_U8*)laszip_dll->attributer->attributes))
+      if (laszip_add_vlr(laszip_dll, "LASF_Spec\0\0\0\0\0\0", 4, 
(laszip_U16)(laszip_dll->attributer->number_attributes*sizeof(LASattribute)), 
0, (laszip_U8*)laszip_dll->attributer->attributes))
       {
         sprintf(laszip_dll->error, "adding the extra bytes VLR with the 
additional attributes");
         return 1;
@@ -2775,7 +2776,7 @@
   laszip_U8 point_type = laszip_dll->header.point_data_format;
   laszip_U16 point_size = laszip_dll->header.point_data_record_length;
 
-  if (compress && (point_type > 5) && laszip_dll->request_compatibility_mode)
+  if ((point_type > 5) && laszip_dll->request_compatibility_mode)
   {
     if (!laszip->request_compatibility_mode(1))
     {
@@ -2914,7 +2915,13 @@
 
     // open the file
 
-    laszip_dll->file = fopen(file_name, "wb");
+#ifdef _MSC_VER
+    wchar_t* utf16_file_name = UTF8toUTF16(file_name);
+    laszip_dll->file = _wfopen(utf16_file_name, L"wb");
+    delete [] utf16_file_name;
+#else
+       laszip_dll->file = fopen(file_name, "wb");
+#endif
 
     if (laszip_dll->file == 0)
     {
@@ -4164,7 +4171,7 @@
 
           if (attributer.number_attributes)
           {
-            if (laszip_add_vlr(laszip_dll, "LASF_Spec\0\0\0\0\0\0", 4, 
attributer.number_attributes*sizeof(LASattribute), 0, 
(laszip_U8*)attributer.attributes))
+            if (laszip_add_vlr(laszip_dll, "LASF_Spec\0\0\0\0\0\0", 4, 
(laszip_U16)(attributer.number_attributes*sizeof(LASattribute)), 0, 
(laszip_U8*)attributer.attributes))
             {
               sprintf(laszip_dll->error, "rewriting the extra bytes VLR 
without 'LAS 1.4 compatibility mode' attributes");
               return 1;
@@ -4323,7 +4330,13 @@
 
     // open the file
 
-    laszip_dll->file = fopen(file_name, "rb");
+#ifdef _MSC_VER
+    wchar_t* utf16_file_name = UTF8toUTF16(file_name);
+    laszip_dll->file = _wfopen(utf16_file_name, L"rb");
+    delete [] utf16_file_name;
+#else
+       laszip_dll->file = fopen(file_name, "rb");
+#endif
 
     if (laszip_dll->file == 0)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/mydefs.cpp 
new/laszip-src-3.4.3/src/mydefs.cpp
--- old/laszip-src-3.4.1/src/mydefs.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/laszip-src-3.4.3/src/mydefs.cpp 2019-11-11 21:31:12.000000000 +0100
@@ -0,0 +1,46 @@
+/*
+===============================================================================
+
+  FILE:  mydefs.cpp
+
+  CONTENTS:
+
+    see corresponding header file
+
+  PROGRAMMERS:
+
+    [email protected]  -  http://rapidlasso.com
+
+  COPYRIGHT:
+
+    (c) 2011-2019, martin isenburg, rapidlasso - fast tools to catch reality
+
+    This is free software; you can redistribute and/or modify it under the
+    terms of the GNU Lesser General Licence as published by the Free Software
+    Foundation. See the LICENSE.txt file for more information.
+
+    This software is distributed WITHOUT ANY WARRANTY and without even the
+    implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+  CHANGE HISTORY:
+
+    see corresponding header file
+
+===============================================================================
+*/
+#include "mydefs.hpp"
+
+#if defined(_MSC_VER)
+#include <windows.h>
+wchar_t* UTF8toUTF16(const char* utf8)
+{
+  wchar_t* utf16 = 0;
+  int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, 0, 0);
+  if (len > 0)
+  {
+    utf16 = new wchar_t[len];
+    MultiByteToWideChar(CP_UTF8, 0, utf8, -1, utf16, len);
+  }
+  return utf16;
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/laszip-src-3.4.1/src/mydefs.hpp 
new/laszip-src-3.4.3/src/mydefs.hpp
--- old/laszip-src-3.4.1/src/mydefs.hpp 2019-04-12 21:13:25.000000000 +0200
+++ new/laszip-src-3.4.3/src/mydefs.hpp 2019-11-11 21:31:12.000000000 +0100
@@ -124,17 +124,17 @@
 #define I32_CLAMP(n)    (((n) <= I32_MIN) ? I32_MIN : (((n) >= I32_MAX) ? 
I32_MAX : ((I32)(n))))
 #define U32_CLAMP(n)    (((n) <= U32_MIN) ? U32_MIN : (((n) >= U32_MAX) ? 
U32_MAX : ((U32)(n))))
 
-#define I8_QUANTIZE(n) (((n) >= 0) ? (I8)((n)+0.5f) : (I8)((n)-0.5f))
-#define U8_QUANTIZE(n) (((n) >= 0) ? (U8)((n)+0.5f) : (U8)(0))
+#define I8_QUANTIZE(n) (((n) >= 0) ? (I8)((n)+0.5) : (I8)((n)-0.5))
+#define U8_QUANTIZE(n) (((n) >= 0) ? (U8)((n)+0.5) : (U8)(0))
 
-#define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
-#define U16_QUANTIZE(n) (((n) >= 0) ? (U16)((n)+0.5f) : (U16)(0))
+#define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5) : (I16)((n)-0.5))
+#define U16_QUANTIZE(n) (((n) >= 0) ? (U16)((n)+0.5) : (U16)(0))
 
-#define I32_QUANTIZE(n) (((n) >= 0) ? (I32)((n)+0.5f) : (I32)((n)-0.5f))
-#define U32_QUANTIZE(n) (((n) >= 0) ? (U32)((n)+0.5f) : (U32)(0))
+#define I32_QUANTIZE(n) (((n) >= 0) ? (I32)((n)+0.5) : (I32)((n)-0.5))
+#define U32_QUANTIZE(n) (((n) >= 0) ? (U32)((n)+0.5) : (U32)(0))
 
-#define I64_QUANTIZE(n) (((n) >= 0) ? (I64)((n)+0.5f) : (I64)((n)-0.5f))
-#define U64_QUANTIZE(n) (((n) >= 0) ? (U64)((n)+0.5f) : (U64)(0))
+#define I64_QUANTIZE(n) (((n) >= 0) ? (I64)((n)+0.5) : (I64)((n)-0.5))
+#define U64_QUANTIZE(n) (((n) >= 0) ? (U64)((n)+0.5) : (U64)(0))
 
 #define I16_FLOOR(n) ((((I16)(n)) > (n)) ? (((I16)(n))-1) : ((I16)(n)))
 #define I32_FLOOR(n) ((((I32)(n)) > (n)) ? (((I32)(n))-1) : ((I32)(n)))
@@ -246,4 +246,9 @@
   to[7] = from[0];
 }
 
+#if defined(_MSC_VER)
+#include <windows.h>
+wchar_t* UTF8toUTF16(const char* utf8);
+#endif
+
 #endif

++++++ laszip-src-3.4.1.tar.gz.sha256sum -> laszip-src-3.4.3.tar.gz.sha256sum 
++++++
--- /work/SRC/openSUSE:Factory/laszip/laszip-src-3.4.1.tar.gz.sha256sum 
2019-07-15 22:43:57.407903130 +0200
+++ 
/work/SRC/openSUSE:Factory/.laszip.new.2738/laszip-src-3.4.3.tar.gz.sha256sum   
    2020-05-19 14:47:57.532002977 +0200
@@ -1 +1 @@
-5d9b0ffaf8b7319c2fa216da3f3f878bb8f4e5b4b14d2c154d441a351da2be37  
laszip-src-3.4.1.tar.gz
+53f546a7f06fc969b38d1d71cceb1862b4fc2c4a0965191a0eee81a57c7b373d  
laszip-src-3.4.3.tar.gz


Reply via email to